An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
0answers
265 views

SQL-query should return GeoJSON FeatureCollection

I'm trying to return a GeoJSON FeatureCollection object from a SQL-query with PostgreSQL 9.3 and PostGIS 2.1. This is my query so far: SELECT row_to_json(fc) AS p FROM (SELECT 'FeatureCollection' ...
11
votes
2answers
8k views

How to open a GeoJSON file with mixed geometries in QGIS?

If I have a GEOJson file, for example a file named test.js with inside the following: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": ...
0
votes
2answers
435 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
1
vote
0answers
21 views

Can I use GeoJSON GeometryCollection in QGIS?

I want to create a GeoJSON that contains multiple geometries to be used in QGis later on. Now I red through the specs here: http://geojson.org/geojson-spec.html#geometrycollection When I simply copy ...
2
votes
2answers
387 views

Printing possible for openlayers GeoJson WFS with Mapfish printing service and wkhtmltopdf?

I searched lots of places but I couldn't find proper examples or documentation to do printing using Mapfish Printing service or Wkhtmltopdf. My application has a few WFS layers from openlayers and ...
1
vote
2answers
466 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
0
votes
0answers
17 views

Ol3, dynamic CQL for WFS layer (GeoJSON) from Geoserver

My map in Openlayers (Ol3) contains a WFS layer with GeoJSON format from Geoserver. My intention is to use CQL filters that can be applied by the user through comboboxes next to the map. The CQL ...
0
votes
0answers
17 views

Dynamic data loading in openlayers 3 using Geojson

I am able to load the multiple wfs features using GeoJSON, but now i need to load the features dynamically instead of loading randomly Here is my code // First WFS Layer var url = ...
4
votes
3answers
2k views

Online WKT and GeoJSON viewer

I once found a great but simple webpage that has a drop down with several text-based GIS formats such as GeoJSON and WKT, and a text box to copy/paste your data. The feature is then drawn on a world ...
0
votes
1answer
527 views

Read GeoJSON with openlayers

I generated a GeoJSON a projected table in EPSG: 4326 domeu postgis SELECT ST_AsGeoJSON(geom) FROM "onibus" I put in the www folder on my server I'm running geoserver locally my pages are also in ...
0
votes
0answers
9 views

Select/unselect features in CartoDB layer with reporting features name of all selected features

I have web app based on http://bl.ocks.org/javisantana/d20063afd2c96a733002 template. I tried to make highlight polygon feature and unselect highlighted feature on mouse click with report names all ...
0
votes
2answers
27 views

Administrative level GeoJSON Polygons for African Countries

I'm very new to GIS and I have spent the last few days trying to find some kind of database with the aforementioned polygons with no luck. The purpose is simply to label a location at district level ...
1
vote
1answer
144 views

Routing api help (MapBox or similar)

i have a geoJSON objects and i want to route between waypoints on my geoJSON file. this is my example geojson file. { "type":"FeatureCollection", "generator":"JOSM", "bbox":[ ...
4
votes
2answers
907 views

Offline Phonegap/Openlayers App

I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is ...
0
votes
3answers
2k views

How to get WKT or GEOJson by country or city name with Overpass API?

I'm trying to understand Overpass API, I'm experimenting with it, but cannot get what I expect. Overpass API doesn't return me neither polygon shapes, nor WKT, nor GEOJson, nor even a highlight of the ...
1
vote
0answers
41 views

Using GEOJSON offline in QGIS

I have some GEOJSON-Layers in my QGIS-project. The problem is, that when I zoom in or out, it takes very long to built up the window again. That's because it always loads it from the server. But I ...
0
votes
1answer
153 views

Loading GeoJSON via AJAX after adding Layer to OpenLayers 3?

I'm trying to add a new GeoJSON layer to OpenLayers 3 that I have to fetch via AJAX. I want the user to click on a list of layers, have it add an empty vector layer, and then make an AJAX call and ...
1
vote
1answer
377 views

How to write GML and GeoJSON features while retaining attributes in .NET?

I am developing a .NET project [C#] that needs to export/write features as GML and GeoJSON, including, of course, the attributes; data could queried by a database or manually entered. I checked ...
1
vote
1answer
23 views

leaflet / change a geojson divicon html

I have a geojson layer with a divIcon and now i want to change it. i have tried whit seticon but it does not work. How could i do it? This is what I am trying: papesjson.eachLayer(function(layer){ ...
2
votes
1answer
349 views

Formating GeoJSON file with Leaflet Ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using Leaflet (you can see it here). I was able to show my ...
1
vote
0answers
8 views

Editing geojson without separating segment endpoints

I have a few maps of city sidewalks in Geojson format which I need to manually edit to make corrections. However, in the tools that I've tried, geojson.io and QGIS, segments that share an endpoint are ...
2
votes
1answer
497 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
0
votes
2answers
25 views

Problem loading geojson file on geojson.io

I am newbie in GEOJSON file. I am having difficulty to load my GEOJSON file on geojson.io. Here is my GEOJSON file : https://gist.github.com/anonymous/0abb8f926977d577b52d. The source file is from : ...
3
votes
2answers
343 views

How can we generate GeoJSON from SQL data with latlong

Is there any way we can create GeoJSON from SQL server table with Latitude & Longitude Data?
1
vote
1answer
34 views

gdal_polygonize with World File

I have this image that I want to convert it to GeoJSON. And I have this World File: 0.0388048118 0.0 0.0 -0.0387897595 697054.11331 4458020.56656 When I try to run the gdal_polygonize command ...
1
vote
1answer
41 views

Points of LinearRing do not form a closed linestring - one point intersection

I'm trying to index geojson data using elasticsearch. There is some kind of polygons that causing an error: "Points of LinearRing do not form a closed linestring". Looks like it happens because ...
0
votes
0answers
17 views

geoJSON isn´t showed

I am working in Openlayers 3. I have been trying to show a *.json (GeoJSON) layer but it doesn´t work and I don´t know why. debug tool shows this message: My code is: Vector layer ...
2
votes
0answers
51 views

What is the most suitable way to get the boundary of a state or a country or the whole world dynamically?

I am working on a project where I have to create filled map charts based on the data client has provided. The data has latitude and longitude information. Based on the selected level (city or state or ...
0
votes
0answers
14 views

Skipping the string serialization in json.loads(OGRGeometry::ExportToJson())

I have a for loop that exports a bunch of OGRGeometry objects to a python array in what will eventually become a GeoJSON feature collection. Something like this: features = [] for feature in ...
1
vote
1answer
154 views

Open Layers 3 geoJSON not loading

I am having trouble loading a geoJSON layer (below is my defintion). everything works fine when I read the file locally in a web browser e.g. file:///Z:/inetpub/wwwroot/bang.html however when I try to ...
12
votes
4answers
6k views

GeoJSON Styling information

As far as I can see there is nothing in the GeoJSON standard to store styling information, i.e. line colours, thicknesses etc. Am I missing something or is this just something that GeoJSON doesn't ...
1
vote
1answer
812 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
0
votes
0answers
25 views

mongodb $geoIntersects query for all documents who's polygon contains a point. no results?

I am trying to find all documents for a point that is within a document's polygon. using mongoTemplate to set up my geo index. mongoTemplate.indexOps(Boundary.class).ensureIndex( new ...
11
votes
2answers
4k views

How to Export Feature GeoJSON from PostGIS

I'd like to do a GeoJSON dump of a PostGIS table, but I want to export features (the geometry and the properties) not just the geometry. I've been digging into the ST_AsGeoJSON function but it looks ...
4
votes
0answers
42 views

Describing borehole information with geojson (javascript)

I deal a lot with borehole information and looking the best way to move it around in javascript / take advantage of javascript libraries (e.g. leaflet) for looking at this information on mobile ...
1
vote
1answer
457 views

Continents geometry data / extracting contours of continents from country geometry

I have an ESRI Shapefile data from Natural Earth (Admin-0 Countries). I converted it to geoJSON format. There is no world or continents geometry there, only the county one. And I'd like to extract eg. ...
0
votes
0answers
31 views

How to get GeoJSON properties to appear in openlayers 3 popup when using CLUSTERS?

I'm attempting to get my geoJSON properties to appear in my on-click popup but no matter what I try, it either returns the geometry name object Object or Undefined. I think openlayers stores cluster ...
0
votes
0answers
17 views

how to remove duplicate values geojson on feature.properties.name?, using leaflet oneachfeature

I have duplicate value into select combobox, using oneachfeature and geojson the values are into combobox select, I'm trying to remove duplicate caracteristiscas the GeoJSON to populate within a ...
0
votes
3answers
26 views

Make polygon from area not covered by loaded polygons (like invert selection)

See screenshot, from geojson.io, with a geojson file loaded: So how do we make a polygon out of the blank area? Looking for a way which doesn't involve manually copying selected sequences of ...
0
votes
0answers
18 views

Why does R(gdal) mangle data when converting to geojson?

I've encountered issues with projections in .geojson files created by rgdal, but I never thought it would destroy my data, until I tried this (reproducible example): ...
0
votes
1answer
31 views

Where can I find world map shapefiles/GEOJSONs/KMLs for 1950-2015?

I'm looking for world maps showing countries from 1950-2015. Are there shapefiles, KMLs or GEOJSON files of these?
1
vote
1answer
45 views

Converting OpenStreetMaps PBF to geojson with geocoding

I am able to convert PBF to geojson, but I lack the additional attributes like state, country, city, suburb, type of business etc which is offered by geocoding service like Nominatim. The geojson ...
1
vote
1answer
155 views

Leaflet SVG layer is obscuring the underlying GeoJSON interactivity

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in-place within the leaflet-overlay-pane? (For example, how ...
0
votes
1answer
62 views

How to get GeoJSON properties to appear in popup on feature click in Openlayers3?

I have a map with a base layer and a geojson cluster layer. I want to be able to click an individual feature on the map and have the contents of the properties be displayed in a popup. I currently ...
1
vote
1answer
40 views

GeoJSON and OSM layers with different projection

I have a GeoJSON from NaturalEarth for world state boundaries and I want to display it with only without backgroung. But also, I want to add a OSM layer as another baselayer option. The code I am ...
0
votes
1answer
23 views

GeoJSON not being shown

I was trying to add a GeoJSON feature implementing leadlet, but with no avail. Cannot figure out what is going on? <!DOCTYPE html> <html lang="en"> <head> <meta ...
0
votes
1answer
34 views

Methods for importing GeoJSON feature collection into ArcMap?

I have a GeoJSON file containing a feature collection, with the structure/format validated by http://geojsonlint.com/. What do people recommend as the best way to import this into ArcMap? I have ...
1
vote
2answers
146 views

Write GeoJson into a .geojson file with Python

I want to write a geosjon object with the type <class 'geojson.feature.Feature'> into a .geosjon file. Therefore I tried to use with open(test.geosjon, 'w') as outfile: ...
3
votes
1answer
42 views

How do I produce a GeoJSON with 1 point at a certain lon/lat?

I need to create a GeoJSON string, which contains exactly one point at lon/lat 132.159633, 43.350116. I'm trying to use GeoTools 12-RC1 for that. Let's say I have following method, which is supposed ...
3
votes
2answers
431 views

leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed ...