Hot answers tagged

4

If you look at the example on the man page for ST_PixelAsPolygons you will see how you can access the geometries using table_alias.geom syntax (similar in spirit to how ST_Dump works to turn a set or records into individual rows). Following on from that example, you can pass (gv).geom to the ST_AsGeoJSON function, eg, SELECT ST_AsGeoJSON((gv).geom) FROM ...


3

Nope, not a OGC standard, but is great anyway. IETF Geographic JSON Working Group The Internet Engineering Task Force, in conjunction with the original specification authors, has formed the Geographic JSON WG to standardize the format. Work continues on GitHub at https://github.com/geojson/draft-geojson. http://geojson.org/


3

It might be easiest to try using QGIS and dropping the geojson into it. Then do a join by attribute. A side benefit of it being graphical is that you can browse/label the counties and then quite easily spot check your joined data.


2

You don't provide the "right" content to Turf (your geom is not the expected content for Turf) feats = select2.getFeatures(); var geojson = new ol.format.GeoJSON(); as_geojson = geojson.writeFeatures(feats, { featureProjection: 'EPSG:3857', dataProjection: 'EPSG:4326' }); turf.buffer(as_geojson, 20, 'kilometers'); You can also see this demo I've ...


2

You were almost there... MultiPolygonZ should do the trick: ALTER TABLE urbana_prueba ALTER COLUMN geom TYPE geometry(MultiPolygonZ, 3857) USING ST_Force_3D(geom);


2

You have to change 2 things in your query: add an alias 'geom' right after 1, 1, NULL))


1

OGC Standards are listed on the OGC Standards page. As you will see GeoJSON is not amongst them.


1

Loading multiple geojsons in an application is not a very good idea if you are looking for better performance and speed. You can convert your geojson files to topojson and then load them all asynchronously. Size of topojson files will be less as compared to geojson which will help you to maintain you speed and performance. To convert geojson to topojson, ...


1

You can build an in-memory quadtree with the Esri Geometry API for Java, as in the point-in-polygon sample in the GIS Tools for Hadoop. [Disclosure - collaborator on the GIS Tools for Hadoop.]


1

To hide a feature you can give it an invisible color with rgba(0,0,0,0) (the last value is the transparency value, 1.0 = opaque, 0 = fully transparent). var piky1=new L.geoJson(pol00,{ style: function (feature) { return { fillOpacity: 0.55, weight: 7, color: '#eff682' }; }, onEachFeature: ...


1

One of the things that I did not know about when I started to use JavaScript map libraries like OpenLayers was when a file is loaded from a file system verses a web server. In my early days with OpenLayers, I would try try the OL examples and wonder why they worked on the OpenLayers site but did not work off off c:\user or /user/myid/olfiles. The rude thing ...


1

From what you've described, my guess is that some CSS is shifting your graphics container. It's probably on svg or div.leaflet-overlay-pane. You should be able to use dev tools to inspect and see if there's some inherited margin shifting your graphics north. To demonstrate, here's a fiddle that shows graphics shifted due to margin applied to svg elements. ...


1

It wouldn't be valid GeoJSON I presume, but I doubt it would break most Readers. Problem is, if you do not have a software supporting it, it will get lost in most software like OpenLayers and Leaflet. The GeoJSON read by OpenLayers for example is transfered into OpenLayer's internal geo-format and your nested featurecollection will be lost because OpenLayers ...


1

This is because in your GeoJSON data, you use MultiPoint geometry type. { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": { "date_rec": "2016\/01\/13", "land_type": "…", "waste_type": "…" }, "geometry": { "type": "MultiPoint", "coordinates": [ [2.35, 48.86] ] } ...


1

I've found a fix for now. I'm using the Mapbox API and it comes with mustache.js baked in. Therefore, when using the L.mapbox.template() function, mustache.js will skip over any blank values and finish rendering the DOM.


1

I'm not sure TopoJSON is the answer here. Under the covers leaflet-omnivore is converting the TopoJSON to GeoJSON and feeding that to Leaflet. Using d3js-topojson does exactly the same thing. In the end the polygons being rendered are the same wether sourced as TopoJSON or GeoJSON. You might need to consider simplifying your polygons. The only way you can ...



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