New answers tagged

1

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


0

I recreated your query to see where it goes wrong. The last error you came across is because of the faulty reference of px instead of geom (partly my mistake because I gave the hint of aliasing with geom) but there would likely have been more errors after that. Here's the query I created out of it, as you can see the sensordata has been replaced with just ...


2

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


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/


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

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


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);


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

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

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


0

Your GeoJSON is not valid, remove the {'geojson': "[]"} wrapper. Not sure if that is the cause of your issue, but try with this GeoJSON instead, and see if that solves it: {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [74.886779, 33.571307]}, "properties": {"rastvalues": 9, "id": 1, "species": ...


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


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


0

Try to create a new source and add features from both sources to this new source, then pass this source to your layer var featuresToPass = VectorSource.getFeatures().concat(GeoJsonSource.getFeatures()); var mysource = new ol.source.Vector({ //using a collection the features in the source and the collection will stay in sync features: featuresToPass //new ...


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


0

This is the solution : select2 = new ol.interaction.Select({ condition: ol.events.condition.click }); map.addInteraction(select2); //var feature_buff = select2.getFeatures(); select2.getFeatures().on('change:length', function(e){ var feature_buff = select2.getFeatures(); var geojson = new ol.format.GeoJSON(); for (var ...


0

Maponics sells an International Postal Boundaries product that provides coverage for many countries in Europe. The product is available in SHP format, among others, and is updated quarterly.


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


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


7

Because it's a "oneshot", you can do it manually (also possible running via Node) Open a JavaScript console in your browser. You need to loop to get an array of array of Feature (because each FeatureCollection have one or more Feature) Then, you will use the flatten function to transform the array of array into an array (a recursive function borrowed from ...


8

You could write a simple script in (for example) Python that will process the data for you. import json from itertools import chain Open the file and read the data into a Python dictionary: isil = json.load(open('isil.en.json')) The points object is just a list of feature collections, so you can use the python itertools library to help chain the ...


1

You don't need to convert from SVG to GeoJSON to use the image for a choropleth in d3, although it may be necessary for other libraries. The path information on the SVG file (there must be at least one path for each state/country/state/subdivision in your map) is enough to map data to your SVG image in d3. Let me put it in another way: if you can do a ...



Top 50 recent answers are included