1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <restlet> |
---|
3 | <port>8182</port> |
---|
4 | <log mode="3">./log/access.log</log> |
---|
5 | |
---|
6 | <providers> |
---|
7 | <!--HCC--> |
---|
8 | <provider name="hcc" title="hcc"> |
---|
9 | <description>Webrouting Service</description> |
---|
10 | <services> |
---|
11 | <service name="closest_edge" title="Closest Edge" enable="true"> |
---|
12 | <description>Returns the closest node link to an arbitrary point</description> |
---|
13 | <connection driver="org.postgresql.Driver"> |
---|
14 | <url>jdbc:postgresql://127.0.0.1:5432/hcc</url> |
---|
15 | <user>postgres</user> |
---|
16 | <password></password> |
---|
17 | </connection> |
---|
18 | <projection srid="4612"></projection> |
---|
19 | <limit distance="100000" /> |
---|
20 | <sql> |
---|
21 | <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 hcc_20090121 WHERE the_geom && setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridProvider$) ORDER BY dist LIMIT 1</query> |
---|
22 | <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 hcc_20090121 WHERE the_geom && setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridProvider$) ORDER BY dist LIMIT 1</query> |
---|
23 | <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 hcc_20090121 WHERE the_geom && transform(setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridIn$), $sridProvider$) ORDER BY dist LIMIT 1</query> |
---|
24 | <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 hcc_20090121 WHERE the_geom && transform(setsrid('BOX3D($sonPxM$ $sonPyM$,$sonPxP$ $sonPyP$)'::box3d, $sridIn$), $sridProvider$) ORDER BY dist LIMIT 1</query> |
---|
25 | </sql> |
---|
26 | <parameters> |
---|
27 | <parameter name="point" type="text" codename="point" required="true" /> |
---|
28 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" /> |
---|
29 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" /> |
---|
30 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="0.0005" /> |
---|
31 | <parameter name="request_id" type="text" codename="request_id" required="false" /> |
---|
32 | </parameters> |
---|
33 | <formats> |
---|
34 | <format name="gml" input="true" output="true" /> |
---|
35 | <format name="xml" input="false" output="true" /> |
---|
36 | <format name="html" input="false" output="true" /> |
---|
37 | <format name="geojson" input="true" output="true" /> |
---|
38 | <format name="id" input="false" output="true" /> |
---|
39 | <format name="lonlat" input="true" output="false" /> |
---|
40 | <format name="wkt" input="true" output="true" /> |
---|
41 | <format name="kml" input="true" output="true" srid="4326" /> |
---|
42 | </formats> |
---|
43 | </service> |
---|
44 | |
---|
45 | <service name="shortest_path" title="Shortest Path" enable="true"> |
---|
46 | <description>Returns the shortest path between two arbitrary points</description> |
---|
47 | <connection driver="org.postgresql.Driver"> |
---|
48 | <url>jdbc:postgresql://127.0.0.1:5432/hcc</url> |
---|
49 | <user>postgres</user> |
---|
50 | <password></password> |
---|
51 | </connection> |
---|
52 | <projection srid="4612"></projection> |
---|
53 | <limit distance="10000.0" /> |
---|
54 | <sql> |
---|
55 | <query transformProjectionIn="false" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM shootingstar_sp_smart('hcc_20090121', $sonStartX$, $sonStartY$, $sonEndX$, $sonEndY$, $saBoxSize$,'length',true,true)</query> |
---|
56 | <query transformProjectionIn="false" transformProjectionOut="true">SELECT gid, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM shootingstar_sp_smart('hcc_20090121', $sonStartX$, $sonStartY$, $sonEndX$, $sonEndY$, $saBoxSize$,'length',true,true)</query> |
---|
57 | <query transformProjectionIn="true" transformProjectionOut="false">SELECT gid, AsText(the_geom) AS wkt FROM shootingstar_sp_smart('hcc_20090121', 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> |
---|
58 | <query transformProjectionIn="true" transformProjectionOut="true">SELECT gid, AsText(transform(setSRID(the_geom,$sridProvider$), $sridOut$)) AS wkt FROM shootingstar_sp_smart('hcc_20090121', 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> |
---|
59 | </sql> |
---|
60 | <parameters> |
---|
61 | <parameter name="point_start" type="text" codename="start" required="true" /> |
---|
62 | <parameter name="point_end" type="text" codename="end" required="true" /> |
---|
63 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" /> |
---|
64 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" /> |
---|
65 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="0.004" /> |
---|
66 | <parameter name="request_id" type="text" codename="request_id" required="false" /> |
---|
67 | </parameters> |
---|
68 | <formats> |
---|
69 | <format name="gml" input="true" output="true" template="multilinestring_gml" /> |
---|
70 | <format name="xml" input="false" output="true" template="multilinestring_xml" /> |
---|
71 | <format name="html" input="false" output="true" template="multilinestring_html" /> |
---|
72 | <format name="geojson" input="true" output="true" template="multilinestring_geojson" /> |
---|
73 | <format name="lonlat" input="true" output="false" /> |
---|
74 | <format name="wkt" input="true" output="true" template="multilinestring_wkt" /> |
---|
75 | <format name="kml" input="true" output="true" srid="4326" template="multilinestring_kml" /> |
---|
76 | </formats> |
---|
77 | </service> |
---|
78 | |
---|
79 | <service name="driving_distance" title="Driving Distance" enable="true"> |
---|
80 | <description>Returns a driving distance polygon</description> |
---|
81 | <connection driver="org.postgresql.Driver"> |
---|
82 | <url>jdbc:postgresql://127.0.0.1:5432/hcc</url> |
---|
83 | <user>postgres</user> |
---|
84 | <password></password> |
---|
85 | </connection> |
---|
86 | <projection srid="4612"></projection> |
---|
87 | <sql> |
---|
88 | <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 hcc_20090121'''',(select id from find_node_by_nearest_link_within_distance(''''POINT($sonPx$ $sonPy$)'''',$bbox$,''''hcc_20090121'''')),$distance$,false,false) a, hcc_20090121 b WHERE a.vertex_id = b.source');</query> |
---|
89 | <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 hcc_20090121'''',(select id from find_node_by_nearest_link_within_distance(''''POINT($sonPx$ $sonPy$)'''',$bbox$,''''hcc_20090121'''')),$distance$,false,false) a, hcc_20090121 b WHERE a.vertex_id = b.source');</query> |
---|
90 | <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 '''',(select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonPx$ $sonPy$)'''',$sridIn$,$sridProvider$),$bbox$,''''hcc_20090121'''')),$distance$,false,false) a, hcc_20090121 b WHERE a.vertex_id = b.source');</query> |
---|
91 | <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 hcc_20090121'''',(select id from find_node_by_nearest_link_within_distance(text2text_transform(''''POINT($sonPx$ $sonPy$)'''',$sridIn$,$sridProvider$),$bbox$,''''hcc_20090121'''')),$distance$,false,false) a, hcc_20090121 b WHERE a.vertex_id = b.source');</query> |
---|
92 | </sql> |
---|
93 | <parameters> |
---|
94 | <parameter name="point" type="text" codename="data" required="true" /> |
---|
95 | <parameter name="time" type="integer" codename="time" required="false" /> |
---|
96 | <parameter name="length" type="integer" codename="length" required="false" /> |
---|
97 | <parameter name="speed" type="integer" codename="speed" required="false" default="80" /> |
---|
98 | <parameter name="sridInput" type="integer" codename="sridIn" required="false" /> |
---|
99 | <parameter name="sridOutput" type="integer" codename="sridOut" required="false" /> |
---|
100 | <parameter name="bbox" type="integer" codename="bbox" required="false" default="0.004" /> |
---|
101 | <parameter name="request_id" type="text" codename="request_id" required="false" /> |
---|
102 | </parameters> |
---|
103 | <formats> |
---|
104 | <format name="gml" input="true" output="true" /> |
---|
105 | <format name="xml" input="false" output="true" /> |
---|
106 | <format name="html" input="false" output="true" /> |
---|
107 | <format name="geojson" input="true" output="true" /> |
---|
108 | <format name="lonlat" input="true" output="false" /> |
---|
109 | <format name="wkt" input="true" output="true" /> |
---|
110 | <format name="kml" input="true" output="true" srid="4326" /> |
---|
111 | </formats> |
---|
112 | </service> |
---|
113 | </services> |
---|
114 | </provider> |
---|
115 | </providers> |
---|
116 | </restlet> |
---|