An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
1answer
861 views

How to get correct format of coordinates for export to geojson from QGIS?

I've created a custom map in QGIS with a few shapefiles. I'm using leaflet.js to render the map and the shapefile points and everything lines up correctly. The CRS is set to 4326. When I export the ...
0
votes
0answers
495 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
1answer
502 views

PostGIS error reads “Geometry has Z dimension but column does not” [duplicate]

I try to store a polygon in GeoJSON format into my PostGIS table. Both are using the CRS EPSG:3857. This is how the polygon is defined. Note that I put in some whitespace to make it more readable. { ...
7
votes
3answers
3k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
3
votes
3answers
1k views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
2
votes
1answer
1k views

Conversion from Shapefile to TopoJSON format results in incorrect map when rendered using d3js

I am trying to build a map of Canada showing FSA boundaries using d3js. I got shape data from Statistics Canada ...
2
votes
1answer
261 views

Kartograph Open Street Maps

Firstly, congratulations to Gregor Aisch for creating such a wonderful library, thank you! I am having a little trouble rendering an svg from some osm data. I downloaded the Sweden transportation ...
3
votes
2answers
131 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. ...
1
vote
4answers
285 views

Does shapefile or MapInfo TAB have advantage as source format for OGR conversion to GeoJSON?

I'm relatively new to OGR and GIS in general. Most of the sources I look at give a choice of ESRI shapefile and MapInfo formats. I'm using ogr2ogr to convert these to GeoJSON for import into ...
4
votes
3answers
834 views

Interacting between Openlayers and Python

I have a openlayers website like this one that gives the user the ability to draw polygons and then creates a GeoJSON file. I want to process this GeoJSON with a python script. The python script ...
2
votes
1answer
186 views

SQL Command to convert pgRouting result to GeoJSON

My goal is to produce a Web UI for pgRouting using this tutorial. I have already imported my data from an OSM pBF to PostGIS using osm2po. Using the pgRoutingLayer plugin for QGIS, I was able to ...
0
votes
1answer
156 views

Saving part of OSM shapefile in QGIS as GeoJSON strips 'name' field to 25 characters long [duplicate]

I want to copy part of OSM data in ESRI Shapefile (downloaded from http://download.geofabrik.de/europe/ukraine.html ) and save in in GeoJSON to style later in Tilemill. After saving, I see that ...
1
vote
1answer
76 views

BBox missing when converting TIGER to GeoJSON

I can't get the bounding boxes of polygons if TIGER/Line shape files when converting them to GeoJSON using FWTools. The other default information is present and there is no difference between the ...
2
votes
2answers
630 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?
1
vote
1answer
639 views

What is the best way to use Leaflet and Geoserver to highligh a feature after a WMS request?

I have a web map, and I'm hoping to make it interactive. The layer I have is reasonably large, at 15 mb in GeoJSON format 4 mb compressed, so I don't want to load the whole layer as one file. But, I ...
1
vote
1answer
355 views

Reprojecting coordinates and geoJSON in leaflet

I have a Leaflet map in default projection and a wms layer also in default (web mercator) projection. I would like to add polylines and a geoJSON layer to my map, but the coordinates are in EPSG4326. ...
2
votes
1answer
129 views

Natural Earth: How to get the position of all provinces that belong to a state

This question is about Natural earth 1:10 states and provinces.shp file. I'm using ogr2ogr and want to know the name of the id i need to pass . In purpose of pulling out the right states regions. ...
2
votes
1answer
232 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 ...
0
votes
1answer
666 views

GeoJSON Get Request MVC 4

I'm having trouble creating an OpenLayers Vector layer with GeoJSON data in an MVC 4 application. The GET request for my json file always comes back with a 404.3 error - page cannot be served ...
4
votes
1answer
1k views

leaflet geojson coordinate problem

I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on. My coordinates are: 52.23943, 4.97599. They work correct with ...
1
vote
0answers
625 views

OpenLayers and GeoJSON - possible to create, modify and delete features?

I wondered if anyone has some OpenLayers GeoJSON code to read, create, modify and delete features (i.e. instead of using WFS-T)? This is how far I've come - I've no problem changing the pop-up to a ...
1
vote
1answer
309 views

TopoJSON without Quantization

I have been investigating using TopoJSON files to map floor plans for various buildings. As GeoJSON these files render perfectly, however after converting to TopoJSON they are missing a lot of the ...
7
votes
2answers
915 views

Converting KML files for use with Python library Shapely

I am trying to get a KML-file (wijken.kml) into Shapely. The KML-file is validated against the proper XML schema, so I guess the input is correct. Routes I have tried: 1) Converting to WKT or WKB ...
0
votes
1answer
241 views

GeoJSON won't show in IE, but works fine in FF

I’m not sure if this question isn’t too specific for Stack Exchange, but I really can’t find a solution, and even extensive web search hasn’t brought up any help. There are similar, but different ...
0
votes
1answer
1k views

Problem loading a GeoJSON file using Openlayers

I am setting up a website using Openlayers and GeoJSON files. When I get the GeoJSON file using the code below it work as expected. url: "./file.geojson", But if I try and use the full domain ...
1
vote
1answer
1k views

OpenLayers and GeoJSON - problem projecting EPSG:4326

I'm trying to project some GeoJSON data but it ends up at 0,0. I've looked at other posts and tried those solutions to no avail. Can anyone help? Here is the code: <html> <head> ...
0
votes
1answer
595 views

Geojson multipolygon doesn't work with Leaflet bindPopup?

I have polygon and multipolygon data in Geojson format and when I try to bind popup for polygon, it works perfectly, and when I try to bind it for multipolygon, it doesn't work. Is that some Leaflet ...
1
vote
2answers
236 views

converted SHP to geoJSON - how to put this on OSM map?

I'm a beginner at this. I converted a shapefile to a .js file but I am having trouble adding this data to a map using leaflet. The osmscarb.js: var osmscarb = { "type": "FeatureCollection", ...
0
votes
1answer
655 views

Selection and Popups on Overlapping/Coincident Vector Layer Polygons in OpenLayers

I have a GeoJSON file of polygons that I am bringing into my OpenLayers session. Some of the polygons occupy the same space on the map. I am using a select control and popup control like:- ...
1
vote
1answer
664 views

How to add images in CartoDB infowindows

Can't seem to get the default site to display images. I've added hrefs to a image column. example; I've dragged the image column to the top of the infowindow sidebar app and it still just displays ...
3
votes
0answers
127 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 ...
1
vote
3answers
1k views

Exporting 2 shp layers to geojson using quantum GIS

I will explain with an example: I have 2 shp files for Tanzania. Tanzania inland waters http://www.diva-gis.org/data/wat/TZA_wat.zip Tanzania administrative boundaries ...
1
vote
1answer
34 views

GeoJSON - Resymbolize without redownloading?

GeoJSON served via GeoServer to OpenLayers. Simple question - Is it possible to apply a new styleMap without redownloading the data from the server? I am currently using the following, but am ...
0
votes
1answer
525 views

Attribute extraction from GeoJSON to symbolize - OpenLayers

Loading polygons from geoserver via OpenLayers using GeoJSON. My plan is to symbolize using attributes in the GeoJSON. I am struggling to access the attributes. Any insight appreciated: The ...
1
vote
1answer
2k views

Integrate GeoJSON file with openlayers.protocol.http

I've got a problem with (the title says it) integrating a geojson file in my openlayers map. I have to use the openlayers.protocol.http way. I examined lots of examples on the web (and on ...
3
votes
3answers
542 views

How to properly convert landmass NaturalEarth data into GeoJSON?

100% Newbie. I've been following Mike's d3 Map Tutorial and I've come up against a challenge. I guess my question essentially boils down to: how does one generate the proper GeoJSON/TopoJSON files ...
9
votes
5answers
2k views

GML, KML, GeoJSON - Speed rendering 3109 polygons?

I am working with Geoserver, serving U.S. Lower 48 counties to openlayers (3109 polygons - lots more vertices). The counties are loaded into a postgis database. I am curious about developer ...
3
votes
1answer
733 views

How to avoid corrupt geometries when translating between TopoJSON and GeoJSON?

I'm trying to display some geojson vector features on a leaflet map. The size of my GeoJSON is too big (25.4mb of data, 8.47mb gzipped), so I'm trying to use a TopoJSON format to reduce the size ...
5
votes
1answer
440 views

Generate tiles for google maps overlays

I am trying to show some information on Google Maps which would be in the form of translucent circle overlays. The problem is that some circles overlap, which results in increased opacity and blending ...
2
votes
1answer
646 views

Spatial Data from Postgis to Java/REST with RestEasy + Jackson

I'm developing an application where I take a route from google maps, save it in postgresql/postgis. I'd like to take this route (LineString geometry) and send it back to Google Maps. I already can ...
8
votes
4answers
1k views

GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
3
votes
1answer
416 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 ...
5
votes
1answer
719 views

Real time positioning of vector features using database

I am a newbie in GIS and want to implement something like a vehicle tracker wherein I will get a series of coordinates in a database. I have no idea how to go about it, I mean what should my process ...
2
votes
1answer
581 views

How to visuilze PostGIS data in GeoJSON format with PHP

I need to visualize PostGIS Geometry column as an overlay of a Leaflet tiled Map. I started a question here ,but didn't get any simple and satisfied answer. So I am starting this question. I got an ...
4
votes
2answers
544 views

binding nested arrays as geojson popups in leaflet

I am struggling with geojson popups in leaflet.js I have nested arrays as properties for my features - an example would be counts of fish caught at a location (not my actual project data!) ...
22
votes
1answer
4k views

Convert GeoJSON to TopoJSON

Question How do you convert GeoJSON data to TopoJSON? Why Topojson files are often smaller than geojson and the conversion allows you to incrementally simplify a dataset, if you wish.
6
votes
1answer
3k views

What is the default projection in Leaflet?

I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
1
vote
2answers
634 views

Trouble with GeoJSON in HTTP GET Request

I using a Vector Layer with the HTTP protocol to request GeoJSON from my web server, and am trying to get this GeoJSON to display on my map. The GET request appears to be working correctly, as I can ...
0
votes
1answer
273 views

how can i render geojson format and gml format?

I can show wms png format my map but i didnt render jeojson and gml format by the way my url is correct service. İn additonal i used same code in my local and i can render local geoserver . plz show ...
0
votes
1answer
486 views

OpenLayers polygon fill not working with GeoJSON file as source

I'm trying to visualise some data in a custom shape on a map, and I'm stuck with styling it. I'm currently using the openlayers framework in combination with a geoJSON file that I generate in code. ...