I've integrated Pgdijkstra Routing Module with PostGis. I've done some tests, with PgAdmin. I've loaded some streets, and tried "shortest_path" function between two sites and worked very well, as I obtained a list of four streets with their "geom" data as MultiLineString.
My problem, maybe, is related with the fact that i don't know very well how GeoServer works with, for example, MapBuilder as client. What i want to do is having a web page with a map, streets, inside it and a litle form where you can ask for the shortest route between two streets. And you have to recive as response the map with a MultiLineString layer, drawing the result obtained from PostGis, over the Map, and perhaps the list of the streets and the length for them, this is obtained from "shortest_path" function.
Thanks everyone.
PD: Sorry for my english.
Hi Alvaro
The way GeoServer and MapBuilder works is this: MapBuilder issues GetMap requests to GeoServer via WMS. So when a user pans or zooms in, MapBuilder creates a new request and sends it off to GeoServer. GeoServer then renders the map and sends the image back to MapBuilder, which then displays the map. GeoServer and GeoTools do not know how to communicate with Pgdijkstra, so what you will have to do is write a custom call to PostGis, bypassing GeoServer, that will return the roads that are the shortest route. You can then take those roads that were returned, put them into and SLD file that has those roads as inline features, and send the appropriate WMS request off to GeoServer. GeoServer will then render the map and your roads into one image.
Here is a tutorial on inline features for SLD requests:
http://docs.codehaus.org/display/GEOSDOC/InlineFeature
and here is another:
http://docs.codehaus.org/display/GEOSDOC/InLineFeature+Usage
Basically what it does is send some extra features for GeoServer to render over the map. You can custom color these roads to be bright blue or yellow or whatever, so they will stand out.
I'm not sure I explained it that well, so if you are having issues just ask again and I will try to explain it better.
Good luck,
Brent Owens
(The Open Planning Project)
PS: your english is great!
Álvaro Gutiérrez wrote:
I've integrated Pgdijkstra Routing Module with PostGis. I've done some tests, with PgAdmin. I've loaded some streets, and tried "shortest_path" function between two sites and worked very well, as I obtained a list of four streets with their "geom" data as MultiLineString.
My problem, maybe, is related with the fact that i don't know very well how GeoServer works with, for example, MapBuilder as client. What i want to do is having a web page with a map, streets, inside it and a litle form where you can ask for the shortest route between two streets. And you have to recive as response the map with a MultiLineString layer, drawing the result obtained from PostGis, over the Map, and perhaps the list of the streets and the length for them, this is obtained from "shortest_path" function.
Thanks everyone.
PD: Sorry for my english.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Thanks for your answers. At least I know that it's possible doing these things, as I'm starting with "maps", and I'm a bit lost. If I need more answers here is the place, and I'm willing to improve my skills to help everyone.
Thanks again.
Brent Owens escribió:
Hi Alvaro
The way GeoServer and MapBuilder works is this: MapBuilder issues GetMap requests to GeoServer via WMS. So when a user pans or zooms in, MapBuilder creates a new request and sends it off to GeoServer. GeoServer then renders the map and sends the image back to MapBuilder, which then displays the map. GeoServer and GeoTools do not know how to communicate with Pgdijkstra, so what you will have to do is write a custom call to PostGis, bypassing GeoServer, that will return the roads that are the shortest route. You can then take those roads that were returned, put them into and SLD file that has those roads as inline features, and send the appropriate WMS request off to GeoServer. GeoServer will then render the map and your roads into one image.
Here is a tutorial on inline features for SLD requests:
http://docs.codehaus.org/display/GEOSDOC/InlineFeature
and here is another:
http://docs.codehaus.org/display/GEOSDOC/InLineFeature+Usage
Basically what it does is send some extra features for GeoServer to render over the map. You can custom color these roads to be bright blue or yellow or whatever, so they will stand out.
I'm not sure I explained it that well, so if you are having issues just ask again and I will try to explain it better.
Good luck,
Brent Owens
(The Open Planning Project)
PS: your english is great!
Álvaro Gutiérrez wrote:
I've integrated Pgdijkstra Routing Module with PostGis. I've done some tests, with PgAdmin. I've loaded some streets, and tried "shortest_path" function between two sites and worked very well, as I obtained a list of four streets with their "geom" data as MultiLineString.
My problem, maybe, is related with the fact that i don't know very well how GeoServer works with, for example, MapBuilder as client. What i want to do is having a web page with a map, streets, inside it and a litle form where you can ask for the shortest route between two streets. And you have to recive as response the map with a MultiLineString layer, drawing the result obtained from PostGis, over the Map, and perhaps the list of the streets and the length for them, this is obtained from "shortest_path" function.
Thanks everyone.
PD: Sorry for my english.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
To see some code that communicates with a WMS, you should take a look at the 'WMS Example' demo in the demos page.
This is an included pure javascipt demo that comes with GeoServer. It is a really cool demo written by Dave. You can find it here:
http://localhost:8080/geoserver/data/demo/popup_map/index.html
(you need to have geoserver running locally to use it)
Under your GeoServer install directory, navigate to server\geoserver\data\demo\popup_map
That is where the code lives.
It does everything from panning, zooming, and adding features to the layer.
I hope it can help you as well.
Brent Owens
(The Open Planning Project)
Álvaro Gutiérrez wrote:
Thanks for your answers. At least I know that it's possible doing these things, as I'm starting with "maps", and I'm a bit lost. If I need more answers here is the place, and I'm willing to improve my skills to help everyone.
Thanks again.
Brent Owens escribió:
Hi Alvaro
The way GeoServer and MapBuilder works is this: MapBuilder issues GetMap requests to GeoServer via WMS. So when a user pans or zooms in, MapBuilder creates a new request and sends it off to GeoServer. GeoServer then renders the map and sends the image back to MapBuilder, which then displays the map. GeoServer and GeoTools do not know how to communicate with Pgdijkstra, so what you will have to do is write a custom call to PostGis, bypassing GeoServer, that will return the roads that are the shortest route. You can then take those roads that were returned, put them into and SLD file that has those roads as inline features, and send the appropriate WMS request off to GeoServer. GeoServer will then render the map and your roads into one image.
Here is a tutorial on inline features for SLD requests:
http://docs.codehaus.org/display/GEOSDOC/InlineFeature
and here is another:
http://docs.codehaus.org/display/GEOSDOC/InLineFeature+Usage
Basically what it does is send some extra features for GeoServer to render over the map. You can custom color these roads to be bright blue or yellow or whatever, so they will stand out.
I'm not sure I explained it that well, so if you are having issues just ask again and I will try to explain it better.
Good luck,
Brent Owens
(The Open Planning Project)
PS: your english is great!
Álvaro Gutiérrez wrote:
I've integrated Pgdijkstra Routing Module with PostGis. I've done some tests, with PgAdmin. I've loaded some streets, and tried "shortest_path" function between two sites and worked very well, as I obtained a list of four streets with their "geom" data as MultiLineString.
My problem, maybe, is related with the fact that i don't know very well how GeoServer works with, for example, MapBuilder as client. What i want to do is having a web page with a map, streets, inside it and a litle form where you can ask for the shortest route between two streets. And you have to recive as response the map with a MultiLineString layer, drawing the result obtained from PostGis, over the Map, and perhaps the list of the streets and the length for them, this is obtained from "shortest_path" function.
Thanks everyone.
PD: Sorry for my english.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users