New answers tagged

0

I think I found an interim solution, which I'm posting in case it's useful for anyone: import pandas as pd import numpy as np from geopandas import GeoDataFrame from shapely.geometry import Point, LineString # Zip the coordinates into a point object and convert to a GeoDataFrame geometry = [Point(xy) for xy in zip(df.lon, df.lat)] df = GeoDataFrame(df, ...


0

Wow, that long query is really necessary? What's wrong with: SELECT 1 gid, ST_Difference(ST_Union(lparcels.geom), ST_Union(luse.geom)) geom FROM boundary_test.land_use luse, boundary_test.land_parcels lparcels Or if you really need single part geometry: SELECT (dump_geom).path[1],(dump_geom).geom geom FROM (SELECT (ST_Dump(ST_Difference(ST_Union(...


8

According to Romain D on it1me.com, it can be done with the Leaflet.PolylineOffset as referenced in the comments by MattPil29 above. I have adapted it for the data in your example. I turned off your original line by changing opacity to 0 in myStyle. There is probably a more elegant way to not add it. The other key is flipping the x,y coordinate to make L....


0

I wrote this method which does the trick using JTS: public LineString refineLineString(LineString ls, double maximalDistance){ // list to store coordinates for resulting line string ArrayList<Coordinate> resultLineStringCoordinates = new ArrayList(); // list of LineSegments from input LineString ArrayList<LineSegment> segmentList ...


0

Couldn't you just run an erase and end up with any stray line segments or add an erase to your script. Could you just covert your land use polygon to a polyline and run an intersect to see which areas actually overlap?



Top 50 recent answers are included