Dear Jan.
Thank you for you reply.
I've downloaded denmark.osm.highway.bz2 (data exactly I'm looking for) and
imported it into PostgreSQL db configured to API v.6.0 Now I have ways,
nodes, relatins, etc, there...
Could you point me please, how to build a graph now in Java app(I didn't
find a
2010/6/16 Jan Torben Heuer jan_key67...@jtheuer.de
Oleg Demchenko wrote:
Data is given from a Denmark OSM highway shapefile downloaded from public
CloudsMade server. In order to optimize process I'm selecting from
database
If you use the OSM data, why don't you download their nodes and
Hi Jody.
I'm using DirectedLineStringGraphGenerator to build a Directed Graph from
VectorLineString.
...
//create a linear graph generate
DirectedLineStringGraphGenerator lineStringGen =
new DirectedLineStringGraphGenerator();
for (int i = 0; i lines.size();
I think you will want to look inside the code of both of those; and produce
your own graph generator that does exactly what you want.
Jody
On 17/06/2010, at 5:27 PM, Oleg Demchenko wrote:
Hi Jody.
I'm using DirectedLineStringGraphGenerator to build a Directed Graph from
VectorLineString.
Oleg Demchenko wrote:
Well, there are RegionName.osm.bz2 and RegionName.highway.bz2
available for each region/country on CloudsMade.
I've loaded it to my postGIS DB wiith osm2pgsql Utility. File *
I took the OSMOSIS importer. It creates graphs.
Jan
P.S. Please only reply to list, not to my
Oleg Demchenko wrote:
Data is given from a Denmark OSM highway shapefile downloaded from public
CloudsMade server. In order to optimize process I'm selecting from
database
If you use the OSM data, why don't you download their nodes and ways
directly instead of using the generated shapefile
There is also a seperate builder that builds a graph based on the line
segmenets; perhaps you could combine the two ideas in your own graph builder
and contribute the result back/
Jody
On 16/06/2010, at 8:08 PM, Oleg Demchenko wrote:
Hi Dear All.
I'm quite new in Geotools area and hope
Could you confirm that you received the data you needed?
Chris.
On Jan 19, 2008 1:06 AM, Justin Deoliveira [EMAIL PROTECTED] wrote:
Hi Chris,
Sorry, its been a busy week and I have not had time to keep up with your
questions. Its not immediately evident to me what is wrong with your
code. I
Hi Chris,
Yes I got the data you sent. My apologies for not being able to dedicate
time to this but I am quite swamped with project work at the moment and
probably wont be able to get to this until the weekend.
-Justin
Chris wrote
Could you confirm that you received the data you needed?
Hi Chris,
Sorry, its been a busy week and I have not had time to keep up with your
questions. Its not immediately evident to me what is wrong with your
code. I would have to debug it over on my end. You said your data is a
shapefile with a few thousands rows in it? If there are no licensing or
Sorry, it is me again but I'm still stuck with the same problem: I
tried the following
Coordinate[] c = new
Coordinate[]{(l1.getStartPoint()).getCoordinate(), p.getCoordinate()};
LineString l1a = new LineString(new CoordinateArraySequence(c), new
GeometryFactory(new PrecisionModel(
After displaying the itineraries on a map (Google maps), I noticed that
Dijkstra returned strange results sometimes. It would not take a shorter
path for no apparent reason. Hence, I decided to have a look at the
splitting function again to see if I could find a problem.
I did find one, a test
I simplified my function. That is to say, when I detect an intersection
between l1 and l2, I only split l2. I think that anyway, at some point, the
function will detect an intersection between l2 and l1, splitting l1.
My LineString vector size is now 2.2M, when serialized. The problem is that
Trying to see what's wrong with my graph, I decided to print some
information. The node I chose to start from is supposed to have 3 edges
(which is true, so far so good). However, I displayed the coordinates of the
nodes:
Origine node:
x: 6.844562915500704, y: 47.641801629239914
Nodes of the
Could you tell me what is wrong with this part of code?
Coordinate[] c = new Coordinate[]{(l1.getStartPoint()).getCoordinate(),
p.getCoordinate()};
LineString l1a = new LineString(new CoordinateArraySequence(c), new
GeometryFactory());
l1_sub.add(l1a);
if(!l1.covers(l1a))
Hi Chris,
I would have to mock up some data and test it but I dont think the
problem is the method but in the management of the data structure. The
code is modifying the same list it is iterating over... which is
generally not a great idea.
I recommend restructuring the algorithm so that when
I added some debug, and apparently, the LineString intersection is not due
to my algorithm. It happens approximately 12 times in the first loop
iteration, then it does not happen anymore. This was probably due to my
shapefile.
So I chose to ignore the LineString intersections and now my algorithm
I tried to use another Vector as you advised. This way, the size the the
lines Vector is not changing while iterating on it. I'm joining the new code
to this mail.
It is taking quite some time (2-3 minutes) but this time I got an exception:
java.lang.ClassCastException:
Chris wrote:
I added some debug, and apparently, the LineString intersection is not
due to my algorithm. It happens approximately 12 times in the first loop
iteration, then it does not happen anymore. This was probably due to my
shapefile.
So I chose to ignore the LineString intersections
19 matches
Mail list logo