1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <restlet>
|
---|
3 | <port>8182</port>
|
---|
4 | <log mode="2">./log/access.log</log>
|
---|
5 |
|
---|
6 | <providers>
|
---|
7 | <provider name="geobase" title="Geobase">
|
---|
8 | <description>Geobase Road Network Data</description>
|
---|
9 | <services>
|
---|
10 | <service name="closest_edge" title="Closest Edge" enable="true">
|
---|
11 | <description>Returns the closest edge to a selected position</description>
|
---|
12 | <connection driver="org.postgresql.Driver"> |
---|
13 | <url>jdbc:postgresql://hostname:port/database</url> |
---|
14 | <user>postgres</user> |
---|
15 | <password></password> |
---|
16 | </connection>
|
---|
17 | <projection srid="900913"></projection> |
---|
18 | <sql>
|
---|
19 | <query transformProjectionIn="false" transformProjectionOut="false">SELECT gid, source, target, AsText(the_geom) AS wkt, distance(the_geom, GeometryFromText('POINT($sonPx$ $sonPy$)',$sridProvider$)) AS dist FROM nrn_bc WHERE the_geom && setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridProvider$) ORDER BY dist LIMIT 1</query>
|
---|
20 | <query transformProjectionIn="false" transformProjectionOut="true">SELECT gid, source, target, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt, distance(the_geom, GeometryFromText('POINT($sonPx$ $sonPy$)',$sridProvider$)) AS dist FROM nrn_bc WHERE the_geom && setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridProvider$) ORDER BY dist LIMIT 1</query>
|
---|
21 | <query transformProjectionIn="true" transformProjectionOut="false">SELECT gid, source, target, AsText(the_geom) AS wkt, distance(the_geom, transform(GeometryFromText('POINT($sonPx$ $sonPy$)',$sridIn$),$sridProvider$)) AS dist FROM nrn_bc WHERE the_geom && transform(setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridIn$), $sridProvider$) ORDER BY dist LIMIT 1</query>
|
---|
22 | <query transformProjectionIn="true" transformProjectionOut="true">SELECT gid, source, target, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt, distance(the_geom, transform(GeometryFromText('POINT($sonPx$ $sonPy$)',$sridIn$),$sridProvider$)) AS dist FROM nrn_bc WHERE the_geom && transform(setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridIn$), $sridProvider$) ORDER BY dist LIMIT 1</query>
|
---|
23 | </sql>
|
---|
24 | <parameters>
|
---|
25 | <parameter name="point" type="text" codename="data" required="true" />
|
---|
26 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" />
|
---|
27 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" />
|
---|
28 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="3000" />
|
---|
29 | <parameter name="request_id" type="text" codename="request_id" required="false" />
|
---|
30 | </parameters>
|
---|
31 | <formats>
|
---|
32 | <format name="gml" input="true" output="true" />
|
---|
33 | <format name="xml" input="false" output="true" />
|
---|
34 | <format name="html" input="false" output="true" />
|
---|
35 | <format name="geojson" input="true" output="true" />
|
---|
36 | <format name="id" input="false" output="true" />
|
---|
37 | <format name="lonlat" input="true" output="false" />
|
---|
38 | <format name="wkt" input="true" output="true" />
|
---|
39 | <format name="kml" input="true" output="true" srid="4326" />
|
---|
40 | </formats> |
---|
41 | </service>
|
---|
42 | <service name="shortest_path" title="Shortest Path" enable="true">
|
---|
43 | <description>Returns the shortest path between start and end</description>
|
---|
44 | <connection driver="org.postgresql.Driver">
|
---|
45 | <url>jdbc:postgresql://hostname:port/database</url>
|
---|
46 | <user>postgres</user>
|
---|
47 | <password></password>
|
---|
48 | </connection>
|
---|
49 | <projection srid="900913"></projection>
|
---|
50 | <sql>
|
---|
51 | <query transformProjectionIn="false" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM shootingstar_sp_smart('nrn_bc', $sonStartX$, $sonStartY$, $sonEndX$, $sonEndY$, $saBoxSize$,'length',true,true)</query>
|
---|
52 | <query transformProjectionIn="false" transformProjectionOut="true">SELECT gid, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM shootingstar_sp_smart('nrn_bc', $sonStartX$, $sonStartY$, $sonEndX$, $sonEndY$, $saBoxSize$,'length',true,true)</query>
|
---|
53 | <query transformProjectionIn="true" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM shootingstar_sp_smart('nrn_bc', X(transform(GeometryFromText('POINT($sonStartX$ $sonStartY$)',$sridIn$),$sridProvider$)), Y(transform(GeometryFromText('POINT($sonStartX$ $sonStartY$)',$sridIn$),$sridProvider$)), X(transform(GeometryFromText('POINT($sonEndX$ $sonEndY$)',$sridIn$),$sridProvider$)), Y(transform(GeometryFromText('POINT($sonEndX$ $sonEndY$)',$sridIn$),$sridProvider$)), $saBoxSize$,'length',true,true)</query>
|
---|
54 | <query transformProjectionIn="true" transformProjectionOut="true">SELECT gid, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM shootingstar_sp_smart('nrn_bc', X(transform(GeometryFromText('POINT($sonStartX$ $sonStartY$)',$sridIn$),$sridProvider$)), Y(transform(GeometryFromText('POINT($sonStartX$ $sonStartY$)',$sridIn$),$sridProvider$)), X(transform(GeometryFromText('POINT($sonEndX$ $sonEndY$)',$sridIn$),$sridProvider$)), Y(transform(GeometryFromText('POINT($sonEndX$ $sonEndY$)',$sridIn$),$sridProvider$)), $saBoxSize$,'length',true,true)</query>
|
---|
55 | </sql>
|
---|
56 | <parameters>
|
---|
57 | <parameter name="point_start" type="text" codename="start" required="true" />
|
---|
58 | <parameter name="point_end" type="text" codename="end" required="true" />
|
---|
59 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" />
|
---|
60 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" />
|
---|
61 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="3000" />
|
---|
62 | <parameter name="request_id" type="text" codename="request_id" required="false" />
|
---|
63 | </parameters>
|
---|
64 | <formats>
|
---|
65 | <format name="gml" input="true" output="true" template="multilinestring_gml" />
|
---|
66 | <format name="xml" input="false" output="true" template="multilinestring_xml" />
|
---|
67 | <format name="html" input="false" output="true" template="multilinestring_html" />
|
---|
68 | <format name="geojson" input="true" output="true" template="multilinestring_geojson" />
|
---|
69 | <format name="lonlat" input="true" output="false" />
|
---|
70 | <format name="wkt" input="true" output="true" template="multilinestring_wkt" />
|
---|
71 | <format name="kml" input="true" output="true" srid="4326" template="multilinestring_kml" />
|
---|
72 | </formats>
|
---|
73 | </service>
|
---|
74 | <service name="driving_distance" title="Driving Distance" enable="true">
|
---|
75 | <description>Returns a driving distance polygon</description>
|
---|
76 | <connection driver="org.postgresql.Driver">
|
---|
77 | <url>jdbc:postgresql://hostname:port/database</url>
|
---|
78 | <user>postgres</user>
|
---|
79 | <password></password>
|
---|
80 | </connection>
|
---|
81 | <projection srid="900913"></projection>
|
---|
82 | <sql>
|
---|
83 | <query transformProjectionIn="false" transformProjectionOut="false">SELECT AsText(the_geom) AS wkt FROM points_as_polygon('SELECT a.vertex_id::integer AS id, b.x1::double precision AS x, b.y1::double precision AS y FROM driving_distance(''''SELECT gid AS id,source::integer,target::integer,length::double precision AS cost FROM nrn_bc'''',(select id from find_node_by_nearest_link_within_distance(''''POINT($sonPx$ $sonPy$)'''',$bbox$,''''nrn_bc'''')),$distance$,false,false) a, nrn_bc b WHERE a.vertex_id = b.source');</query>
|
---|
84 | <query transformProjectionIn="false" transformProjectionOut="true">SELECT AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM points_as_polygon('SELECT a.vertex_id::integer AS id, b.x1::double precision AS x, b.y1::double precision AS y FROM driving_distance(''''SELECT gid AS id,source::integer,target::integer,length::double precision AS cost FROM nrn_bc'''',(select id from find_node_by_nearest_link_within_distance(''''POINT($sonPx$ $sonPy$)'''',$bbox$,''''nrn_bc'''')),$distance$,false,false) a, nrn_bc b WHERE a.vertex_id = b.source');</query>
|
---|
85 | <query transformProjectionIn="true" transformProjectionOut="false">SELECT AsText(the_geom) AS wkt FROM points_as_polygon('SELECT a.vertex_id::integer AS id, b.x1::double precision AS x, b.y1::double precision AS y FROM driving_distance(''''SELECT gid AS id,source::integer,target::integer,length::double precision AS cost FROM nrn_bc'''',(select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonPx$ $sonPy$)'''',$sridIn$,$sridProvider$),$bbox$,''''nrn_bc'''')),$distance$,false,false) a, nrn_bc b WHERE a.vertex_id = b.source');</query>
|
---|
86 | <query transformProjectionIn="true" transformProjectionOut="true">SELECT AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM points_as_polygon('SELECT a.vertex_id::integer AS id, b.x1::double precision AS x, b.y1::double precision AS y FROM driving_distance(''''SELECT gid AS id,source::integer,target::integer,length::double precision AS cost FROM nrn_bc'''',(select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonPx$ $sonPy$)'''',$sridIn$,$sridProvider$),$bbox$,''''nrn_bc'''')),$distance$,false,false) a, nrn_bc b WHERE a.vertex_id = b.source');</query>
|
---|
87 | </sql>
|
---|
88 | <parameters>
|
---|
89 | <parameter name="point" type="text" codename="data" required="true" />
|
---|
90 | <parameter name="time" type="integer" codename="time" required="false" />
|
---|
91 | <parameter name="length" type="integer" codename="distance" required="false" />
|
---|
92 | <parameter name="speed" type="integer" codename="speed" required="false" default="80" />
|
---|
93 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" />
|
---|
94 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" />
|
---|
95 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="3000" />
|
---|
96 | <parameter name="request_id" type="text" codename="request_id" required="false" />
|
---|
97 | </parameters>
|
---|
98 | <formats>
|
---|
99 | <format name="gml" input="true" output="true" template="multilinestring_gml" />
|
---|
100 | <format name="xml" input="false" output="true" template="multilinestring_xml" />
|
---|
101 | <format name="html" input="false" output="true" template="multilinestring_html" />
|
---|
102 | <format name="geojson" input="true" output="true" template="multilinestring_geojson" />
|
---|
103 | <format name="lonlat" input="true" output="false" />
|
---|
104 | <format name="wkt" input="true" output="true" template="multilinestring_wkt" />
|
---|
105 | <format name="kml" input="true" output="true" srid="4326" template="multilinestring_kml" />
|
---|
106 | </formats>
|
---|
107 | </service>
|
---|
108 | <service name="traveling_sales_person" title="Traveling Sales Person" enable="true">
|
---|
109 | <description>Returns path for a TSP request</description>
|
---|
110 | <connection driver="org.postgresql.Driver">
|
---|
111 | <url>jdbc:postgresql://hostname:port/database</url>
|
---|
112 | <user>postgres</user>
|
---|
113 | <password></password>
|
---|
114 | </connection>
|
---|
115 | <projection srid="900913"></projection>
|
---|
116 | <sql>
|
---|
117 | <query transformProjectionIn="false" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM tsp_astar_directed_smart('nrn_bc','$sesSteps$', (select id from find_node_by_nearest_link_within_distance('POINT($sonStartX$ $sonStartY$)',$bbox$,'nrn_bc')),$bbox$,false,false);</query>
|
---|
118 | <query transformProjectionIn="false" transformProjectionOut="true">SELECT gid, AsText(transform(setsrid(the_geom, $sridProvider$), $sridOut$)) AS wkt FROM tsp_astar_directed_smart('nrn_bc','$sesSteps$', (select id from find_node_by_nearest_link_within_distance('POINT($sonStartX$ $sonStartY$)',$bbox$,'nrn_bc')),$bbox$,false,false);</query>
|
---|
119 | <query transformProjectionIn="true" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM tsp_astar_directed_smart('nrn_bc','$sesSteps$', (select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonStartX$ $sonStartY$)'''',$sridIn$,$sridProvider$),$bbox$,'nrn_bc')),$bbox$,false,false);</query>
|
---|
120 | <query transformProjectionIn="true" transformProjectionOut="true">SELECT gid, AsText(transform(setsrid(the_geom, $sridProvider$), $sridOut$)) AS wkt FROM tsp_astar_directed_smart('nrn_bc','$sesSteps$', (select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonStartX$ $sonStartY$)'''',$sridIn$,$sridProvider$),$bbox$,'nrn_bc')),$bbox$,false,false);</query>
|
---|
121 | </sql>
|
---|
122 | <parameters>
|
---|
123 | <parameter name="point_start" type="text" codename="start" required="true" />
|
---|
124 | <parameter name="points_step" type="text" codename="steps" required="true" />
|
---|
125 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" />
|
---|
126 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" />
|
---|
127 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="3000" />
|
---|
128 | <parameter name="findVertex" type="text" codename="findVertex" required="false" default="(select id from find_node_by_nearest_link_within_distance(''''POINT($sonPx$ $sonPy$)'''',$bbox$,''''nrn_bc''''))" />
|
---|
129 | <parameter name="findVertexTransf" type="text" codename="findVertexTransf" required="false" default="(select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonPx$ $sonPy$)'''',$sridIn$,$sridProvider$))" />
|
---|
130 | <parameter name="request_id" type="text" codename="request_id" required="false" />
|
---|
131 | </parameters>
|
---|
132 | <formats>
|
---|
133 | <format name="gml" input="true" output="true" template="multilinestring_gml" />
|
---|
134 | <format name="xml" input="false" output="true" template="multilinestring_xml" />
|
---|
135 | <format name="html" input="false" output="true" template="multilinestring_html" />
|
---|
136 | <format name="geojson" input="true" output="true" template="multilinestring_geojson" />
|
---|
137 | <format name="lonlat" input="true" output="false" />
|
---|
138 | <format name="wkt" input="true" output="true" template="multilinestring_wkt" />
|
---|
139 | <format name="kml" input="true" output="true" srid="4326" template="multilinestring_kml" />
|
---|
140 | </formats>
|
---|
141 | </service>
|
---|
142 | </services>
|
---|
143 | </provider>
|
---|
144 | </providers>
|
---|
145 | </restlet> |
---|