An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

3
votes
2answers
1k views

Getting json feature id on OpenLayers

I'm projecting some features using json format on OpenLayers. I need to get the id from the feature (not the OpenLayers' id but the one in the json file). The file looks something like this. ...
3
votes
1answer
109 views

Day and night zone layer for Leaflet

I'm working with Leaflet and I'd like to show the day and night zones adding a dynamic layer to my map. I was thinking to add a static layer with some transparency and make it move every x minutes but ...
3
votes
1answer
69 views

ogr2gui geojson to csv do not export coordinates

I tried to convert ogr2gui to convert geojson files to csv. The geojson file contains point data only. The resulting csv only contains attribute data, no coordinates. Is there a way to get the ...
3
votes
1answer
5k views

How do I get GeoJSON data from GeoServer into show up on my Leaflet map?

I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
3
votes
1answer
951 views

OpenLayers GeoJSON Data Store

Background: I have a single geoJSON data object that backs multiple Vector Layers of its features. I do this because the feature data has many attributes and can be presented in many different ways, ...
3
votes
1answer
19 views

Leaflet: Change point icon (geoJSON) on click and change back when clicking another point

I would be very grateful if someone could help me with this. I have a geoJSON (10 points) that is drawn using an icon. I want to change the icon when I click on one of the points and then I want to ...
3
votes
1answer
332 views

SQL query to have a complete geojson feature from PostGIS

I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature. so far I tryed to modify the ...
3
votes
1answer
71 views

Lambert_Conformal_Conic: converting from shapefile to geojson fails

I have a shapefile that also contains a proj file that looks like so: PROJCS [ "MGI_Austria_Lambert", GEOGCS [ "GCS_MGI", DATUM [ "D_MGI", ...
3
votes
1answer
92 views

Consume geojson web service in ArcMap

I need to consume data from a REST endpoint that returns features in geojson format within a model in ArcGIS 10.2. Is there a way to access a URL instead of opening a file? If there is no way to ...
3
votes
1answer
582 views

converting/parsing geojson into com.vividsolutions.jts geometry

Does any has any experience with converting string geojson into com.vividsolutions.jts geometry object (point, polygon, etc). Maybe there is some java library I cannot find. Greets!
3
votes
2answers
143 views

Performance loss for OpenLayers EPSG transformation? Storing GeoJSON coordinates in lat/lon or in native map projection?

For a project the map projection is EPSG:32468 (tiles). On top of the map, two or three GeoJSON LineStrings should be displayed using OpenLayers. Each LineString has about 1500 coordinates. ...
3
votes
1answer
3k views

How do you put GeoJSON attribute information in a popup with OpenLayers

I am having some trouble putting GeoJSON attribute information in a pop-up. The selection control is working, and I create an alert (for testing) and this is working. But I can't figure out how you ...
3
votes
1answer
535 views

Change Layer name when converting from GeoJSON

I am converting GeoJSON files to other formats (including KML) using ogr2ogr. As you may know, there is no field in a GeoJSON file to specify the name of the layer, causing every conversion to have ...
3
votes
1answer
2k views

OpenLayers & GeoJSON files

After some hunting, it seems that if I have an a geojson file, I NEED the data and map to be on a server in order to view this in OpenLayers because of the protocol class. I saw an example where I can ...
3
votes
1answer
52 views

Troubleshooting with Tiger for d3 — is this the wrong projection? Why's it look like this?

UPDATE: Solved, sort of … I downloaded the file afresh and tried feeding it through ogr2ogr and topojson again … and wouldn't you know … after a while it worked. I think I was possibly not setting an ...
3
votes
2answers
363 views

Leaflet geoJson in front of markers in a FeatureGroup

I am loading some markers and json data to a leaflet map. I need to get my json in front of the markers. I have tried placing the markers and json in seperate FeatureGroups and then tried ...
3
votes
1answer
68 views

Rounding bug using ST_GeomFromGeojson()

Let's say I have the following geographical point represented in GeoJSON: {"type":"Point","coordinates":[-109.0,35.292506]} When I run the following conversion, things work as expected: SELECT ...
3
votes
1answer
206 views

Why is the exterior shell of this GeoJSON invalid?

I got some data from Zillow's neighborhood database as shapefiles and converted them to GeoJSON. However, some of the objects appear to be malformed when inserting them into MongoDb. Is there ...
3
votes
3answers
276 views

Extracting Earthquake Depth from the USGS GeoJson Earthquake Feed for use with Openlayers

I have some GeoJson from the USGS as follows: {"type":"Feature","properties":{"mag":4.3,"place":"30km ESE of Jarm, ...
3
votes
5answers
526 views

How can I count overlapping polygons, resulting in a new set of polygons?

I have 100 polygons in a GeoJSON file that partially overlap each other. I would like to produce 100 new polygons as follows: The area covered by any of the original 100. This is their union. The ...
3
votes
1answer
1k views

display a choropleth map using D3 and Leaftlet

I am trying to get a leaflet map to display a choropleth map using d3. I have written this code using samples I have found however the map just displays as the black fill, not the color classes I ...
3
votes
1answer
482 views

ogr2ogr from Postgres to GeoJSON missing crs key

I'm using ogr2ogr to convert some OSM data for Greenland (not really important for the question), from a PostGIS database to a file containing GeoJSON. The problem is that the GeoJSON gets written ...
3
votes
1answer
533 views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
3
votes
2answers
606 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 ...
3
votes
0answers
383 views

What are the default units of elevation/altitude/z in GeoJSON?

The GeoJSON spec says "The default CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees". It doesn't say seem to specify ...
3
votes
0answers
151 views

How do I clip Geojson FeatureCollection with another Geojson polygon

I have a GeoJSON file that contains one FeatureCollection with a bunch of features that are polygons. I also have the boundary of the continental USA in another GeoJSON file. I'd like to clip the ...
3
votes
0answers
130 views

GeoJSON support in ArcObjects 10 .NET

i am currently trying to build a geoprocessing application using OpenLayers and ArcObjects, I have some features that user draws on openlayers and i need to send these features to arcobjects for ...
2
votes
4answers
4k views

How to convert SHP into GPX or JSON?

I would like to convert the tree inventory shape files of London (Canada) into a GPX file and if possible into a JSON file. You can download the archive from their Open Data website. It contains the ...
2
votes
2answers
61 views

How to export thousands of features from PostGIS to a single GeoJSON file?

I know how to export one feature from a PostGIS database using ogr2ogr: $ogr2ogr -f GeoJSON out.json "PG:host=localhost dbname=xxx user=xxx password=xxx" -sql 'select id, county, wkb_geometry from ...
2
votes
1answer
732 views

ogr2ogr specify lat/long order on conversion to GeoJSON

When using ogr2ogr to convert a polyon from a .shp file to GeoJSON, I noticed that it writes the coordinates in order lat, long. I noticed this because whenever I tried to view the GeoJSON on a map, ...
2
votes
2answers
859 views

How to project a geoJSON file in OpenLayers?

I have a json file well formed. I want to read a json file as a base layer from OpenLayers. <script type="text/javascript"> var styles = new OpenLayers.StyleMap({ ...
2
votes
2answers
29 views

Coordinate Not Match - Convert Shapefile to Geojson

I'm a newbie at GIS programming and I have a problem with file conversion. I've tried to convert shp file to geojson, and the coordinates do not match. But when I try to convert it to kml, it goes ...
2
votes
2answers
153 views

Convert Shapefiles to GeoJSON?

I'm trying to convert Shapefiles from the State of Texas Senate Districts website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the ...
2
votes
2answers
324 views

How to load big geo-data file into web application

I am building a web app where I show details in map. I load data using geojson file (190 mb). I was looking in different possibilities to show the data, here there are: Leaflet GeoJSon: it should ...
2
votes
1answer
94 views

When do GeoJSON feature collections need feature ids?

I've seen feature collections with feature ids for each feature. I've seen others with no featureid. When do you need it?
2
votes
2answers
3k views

How to label GeoJSON polygons?

I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from feature.properties.name This is my code where I ...
2
votes
3answers
597 views

How to create a efficent linestring out of geography points using postgis

I'm trying to create a linestring out of geography points. At the moment I'm doing it like this: select ST_GeographyFromText(ST_Makeline(a.record_point)) from ( select (record_point::geometry) from ...
2
votes
1answer
51 views

Access to custom GeoJSON members in OpenLayers 2

I need to read a layer-wide attribute, from a GeoJSON file, set by a custom member to the object: {"type": "FeatureCollection", "features": [...], "search_polygon": "POLYGON (...)"} Since it seems ...
2
votes
2answers
565 views

Leaflet.geojson webpage performance out of hand, how to convert to .png?

I exported some countries as a single .geojson file. The file includes every country's vertices and coordinates, as that's what a .geojson is ─ a vector file. Thing is, there are about 20 countries ...
2
votes
2answers
247 views

animate polygons in series of kml/geojson/shp

I have a series of KML files (though they could easily be converted to geoJSON, SHP, or anything else that ogr2ogr can handle), each file containing a set of polygons that correspond to the alpha ...
2
votes
2answers
788 views

GeoJSON to Shape file conversion with geotools

Can someone please provide me an example of how to convert GeoJSON to Shape file using geotools?
2
votes
3answers
489 views

GeoJSON generator with OpenLayers support

Is there a service that allows me to draw on an OpenLayers map, and see the resulting GeoJSON?
2
votes
2answers
2k views

leaflet and geojson tiles

New to mapping. Trying to create a heat map with data that updates every hour for US Counties with leaflet.js similar to http://leaflet.cloudmade.com/examples/choropleth-example.html. But, adding ...
2
votes
1answer
1k views

Polymaps Project + Geojson + D3

How are you doing ? I am Mehul Nahar working on a project which is similar to http://www.tableausoftware.com/learning/examples/gpa-analysis. I have used Polymaps platform, where I have used cloudmade ...
2
votes
1answer
1k views

Openlayers dynamic filtering/styling of geojson layer

I'm working with Openlayers and overlaying a geojson file representing species type over OSM. I have an HTML form that allows users to select a species type and I then need to filter the geojson layer ...
2
votes
2answers
36 views

What's the best way to determine if a point is within a certain distance of a GEOJSON polygon?

What's the best way to determine if a point is within a certain distance of a GEOJSON polygon? Should one use TurfJS buffer method (https://github.com/Turfjs/turf-buffer#turf-buffer)? Can one perform ...
2
votes
2answers
171 views

Reproject GeoJSON in OpenLayers 3

I'm basically trying (and failing) to replicate this in OpenLayers 3. I've set up a fiddle here: http://jsfiddle.net/vu8ecy8v/5/ I'm under the impression that OpenLayers will reproject a GeoJSON ...
2
votes
2answers
141 views

PHP examples to replicate FeatureServer capabilities

I used FeatureServer before and I liked it. The only thing I didn't like, though, is that it needs some other dependencies to work. That's why I want to try PHP instead. I know that there are already ...
2
votes
1answer
111 views

Unicode Decode Error for shapefile in Python

I have Python script for converting shapefiles to Geojson. My code works well if I use some usa data, but when I want to use some other encoding, it gives me this error: Traceback (most recent ...
2
votes
1answer
56 views

GeoJSON and HTML/JavaScript vs Shapefile and Silverlight

I'm developing a map application (Several shapefiles with OpenstreetMap or BingMap on background and some dynamically generated features on the map). I'vs created some part of it with Telerik RadMap ...