New answers tagged

3

You will need: 1) A table with LineString geometries: CREATE TABLE lin ( id serial PRIMARY KEY, geom geometry(LineString, 31370) ); CREATE INDEX ON lin (id); CREATE INDEX ON lin USING gist (geom); 2) A table with Point geometries where you want to split your overlapping lines. They can represent train/metro stations, intersections, bifurcations etc. ...


1

I think your problem is that none of your strings overlap so there is nothing for the union to do. I've tried the following code: SimpleFeatureIterator itr = features.features(); ArrayList<Geometry> geometries = new ArrayList<>(); try { while(itr.hasNext()) { SimpleFeature f = itr.next(); Geometry geom = (Geometry)f....



Top 50 recent answers are included