0

Currently in my project to find shortest and multiple routes from point A to point B I am using Geotools in the following way:

  1. Get paths to be travelled from point A to point B.
  2. Store calculated paths in separate file.
  3. Then execute geotools project to render map and highlight the selected paths.

I want to combine all three steps into one. User should choose two points and when submitted the path should be displayed on the browser. How can I achieve this using java/j2ee? kindly guide me in this matter.

Sandeep
  • 106
  • 1
  • 4

1 Answers1

0

well this is a graph related topic; the fastest way is, according to me, to use something lik JGraph in order to build your in-memory graph and, by passing it 2 points, you can calculate the shortestPath, return the geometry to the browser and show this geometry. Note...this can look simple....but a lot of things are hided (e.g. usually users don't select directly points of your graph, so you have to calculate the closest point to the one selected by the user and so on....)

Angelo Immediata
  • 6,635
  • 4
  • 33
  • 65
  • I dont know anything about jgraph. Is there any api in jgraph that can read shape files and render it on browser. – Sandeep Apr 21 '14 at 07:20
  • Well here it's the main site http://www.jgraph.com/ and it seems that it's possible to read shape file (but honestly I never used it to do read these files); maybe here can be useful http://forum.jgraph.com/questions/1932/how-to-import-and-use-svg-files – Angelo Immediata Apr 21 '14 at 07:59
  • I found this link about geoserver. This framework is developed using j2ee that can be used to publish geospatial data on browser. Need to see how this will server my purpose. http://www.gise.cse.iitb.ac.in/wiki/images/0/02/GeoServer_tutorial.pdf http://docs.geoserver.org/latest/en/user/index.html – Sandeep Apr 29 '14 at 05:59