Tag Info

Hot answers tagged

5

You need a ST_GeomFromGeoJSON select * from points p where ST_Within( p.geom, ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[...]}') ) Edit: ST_Intersects works also (need to set SRID on GeoJSON, and transform): select row_to_json(t) from (select * from table where st_intersects( st_transform( st_setsrid( ...


2

not sure if this fits your use case, but you might be able to use pointToLayer when constructing the geojson var papesjson = L.geoJson(someGeojson, { pointToLayer: function (feature, latlng) { if (feature.properties.estado == "BAJA"){ awesomeclase ="fa-circle-o-notch"; } else if (feature.properties.estado == ...


1

A really nice source for admin boundaries all over the world, at different scales with very nice cartographic quality, is found at Natural Earth. If you are downloading shapefiles, there are several options for converting from a shapefile: 1) geojson.io, to which you upload your shapefile and save as geoJson 2) This converter, same idea without the map to ...


1

Thanks to user30184, I managed to solve the problem. It seems that the version of the GDAL I had installed, which was 1.11.1, had a problem with the function gdal_polygonize.py. I installed the newest version of GDAL (2.0.0) and it works perfectly!


1

Hi your geodata seems to be in a CRS thats not WGS84 (i.e. EPSG:4326). Those can not be properly displayed by github gists or also geojson.io. Try to re-export the original shapefile from QGIS to geojson , and choose WGS84 EPSG:4326 in the CRS field of the dialog that opens when you right-click the layer in QGIS and choose "save as.." Kind regards


1

I created this little utility for a co-worker to plot multiple WKT or GeoJSON geometries on a Leaflet map. You can fork it and tailor it to your needs. http://jsfiddle.net/asnyder14/9dxbcr4f/embedded/result/



Only top voted, non community-wiki answers of a minimum length are eligible