Tag Info

New answers tagged

0

I have very similar problem, except I try to use angular-leaflet-directive. So far i couldn't find much about it. However, please have a look at this example and the block itself. This may give you more ideas on how to link geojson-vt with leaflet.


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( ...


0

First to first. Except you "must" use GeoJson, use it. Otherwise, convert it to TopoJson. Use http://geojson.io its simple, clean, free and its works. Open -> File: load your "mylayer.geojson" (Check if everything it's ok with your map) Save -> TopoJson: map.topojson GeoJson Size: 1.08 Mb TopoJson Size: 0.16 Mb And here a working code from your data: ...


0

Here is the convert tool for shapefile to geojson via web browser without server-side code and supporting non-english encoding, just need to upload the zip file and set the encoding for the correctly text. https://github.com/gipong/shp2geojson.js If you use this library with Google Map api v3, you can skip EPSG code field because the ZIP ...


0

The increased response time is likely due to the delay waiting for getcurrentposition to retrieve the device position. If using on a mobile device there could be a delay while the device attempts to retrieve a position from GPS, or fallbacks to Wifi Geolocation. On a desktop computer this delay could be while the browser queries a Geolocation API to ...


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/


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 ...


0

You can extract the administrative boundaries from the OSM data. There are multiple ways to do this (source). Step 1: Extraction Option 1: Use the allmighty osmosis: osmosis --read-pbf source.osm.pbf --tf accept-relations boundary=administrative --used-way --used-node --wx relation-boundaries.osm Option 2: Use osmfilter: osmconvert source.osm.pbf ...


0

relation //Name of country with native language // Use ["name:en"="France"] for english ["name"="France"] [boundary=administrative] [admin_level=2]; (._;>;); out body qt; It will return you Polygons, Lines and Points, so filter features by type, when import to GIS.


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

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

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!


0

Here is a simple polygon that is touching its own ring at one point: WKT of the polygon is POLYGON ((76 224, 84 224, 84 216, 78 216, 78 221, 79 219, 79 223, 78 221, 76 224)) PostGIS reports that this polygon is not valid: select ST_IsValid(ST_GeomFromText(' POLYGON ((76 224, 84 224, 84 216, 78 216, 78 221, 79 219, 79 223, 78 221, 76 224)) ')) === f ...


0

These days there is Mapbox's SimpleStyle. "properties": { // OPTIONAL: default "" // A title to show when this item is clicked or // hovered over "title": "A title", // OPTIONAL: default "" // A description to show when this item is clicked or // hovered over "description": "A description", ...



Top 50 recent answers are included