Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geojson]

GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON)

4
votes
0answers
292 views

Why does QGIS 3.4 and higher create .tmp file instead of refresh editing layer after saving?

I downloaded QGIS 3.4.0 and try to save edits in .geojson file. I can save new objects, but not edits in attributes. Insted of it, QGIS creates .tmp file with my chаnges into the same folder with ...
4
votes
0answers
460 views

Mapbox GL JS style vector tile interaction in OpenLayers?

I am currently researching different approaches for integrating vector tiles (especially MVT and/or GeoJSON tiles, served from GeoServer) with OpenLayers (^4.0.0) in a manner that would retain access ...
4
votes
0answers
123 views

What simplification should I apply to polygons at each zoom level

I'm sending geoJSON data to a web page and it's too big causing very slow download times. I'm going to simplify on the server side. My question is what tolerance I should use for my simplification ...
4
votes
0answers
135 views

QGIS removes id field when saving as GeoJSON

I have a GeoJSON file of points which I am editing using QGIS 2.16.1. { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": ...
4
votes
0answers
691 views

Create Vector Tiles from Local GeoJSON

Background In a leaflet application I am currently using geojson-vt to turn small geoJSON files (45MB) into tiles stored as a javascript variable. This cannot be done with the larger files (900MB) ...
4
votes
0answers
694 views

Load WFS in Leaflet with BBOX query in non-default projection (i.e. not EPSG:3857)

I've had a look at this question: How to add a bounding box filter to this leaflet WFS request? and have been trying to work out how to get it to work in a different projection system, specifically ...
4
votes
0answers
1k 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 ...
4
votes
0answers
674 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
143 views

Order of geometries in GeometryCollection

Does the order of geometries/features in GeometryCollection/FeatureCollection matter? There is a point in GeoJSON RFC (last point) about order but I could not get fully: The word "Collection" in "...
3
votes
0answers
60 views

Get raster data by coordinate

I do have some data from raster files (timelines, 30m) which I would like to access by coordinate from a web interface. E.g. I know the coordinate and need the data from the corresponding raster file. ...
3
votes
0answers
107 views

Appropriate GeoJSON type for grouping many anonymous objects

I'm writing a converter that produces GeoJSON. My source data has multiple layers of discrete objects over a few square miles. For example: Shuttle Stops: ~25 polygons Shuttle Routes: ~10 line ...
3
votes
0answers
340 views

Can't get georeferenced Autocad DXF to right coordinates

I am not a frequent Autocad user. I wanted to export some floorplans from Autocad 2016 DWG to a final GeoJSON file to be loaded in a Google maps JS app. My steps are: 1)in Autocad set a location ...
3
votes
0answers
221 views

mapnik-vector-tile produces tiles with only one feature

I've written some C/C++ code to wrap mapnik-vector-tile and produce a mapbox vector tile from GeoJSON. mvtc_return * mvtc_from_geo_json(const int tile_size, const ...
3
votes
0answers
1k views

from geometrycollection to polygon geometry with python

I have a geojson file containing a feature with geometrycollection type (polygon and linestring). I need to produce two ESRI Shapefile from the geojson geometrycollection: one with Polygon only and a ...
3
votes
0answers
249 views

Using ogr2ogr in python?

I found this helpful post that got me started using ogr2ogr in python: Using ogr2ogr to convert GML to shapefile in Python? as well as this one: Converting ArcGIS Server JSON to GeoJSON? I am trying ...
3
votes
0answers
2k views

Openlayers 3 different projection Geojson view

My map projection is EPSG:3857. And I want to show a GeoJSON data which has EPSG:4326 projection. var source = new ol.source.Vector({ url: 'http://localhost:15485/api/...
3
votes
0answers
2k views

Leaflet filter on geoJson properties : multiple criteria

I'm using Leaflet filter on geoJson data. I'm able to apply it with a simple criteria : filter: function(feature, layer) { return feature.properties.field1 == "yes"; } I can also apply two ...
3
votes
0answers
354 views

Insert shapefile features into PostgreSQL database using java EE (pragmatically)

I am working with PostgreSQL 9.4 and Java EE. I want to insert shapefile or layer's features into PostgreSQL, is there any solution so I can insert the whole shapefile into the database? OS is Windows ...
3
votes
0answers
1k views

Folium heatmap not displaying

I have an output file data.json [{"5403": 2, "9734": 1, "2565": 5, "5087": 2, "9061": 1, "1761": 4, "4811": 7 "1111": 5, "3891": 3, "1962": 3}] and a shapefile converted to geojson https://www....
3
votes
0answers
198 views

Validate that Openlayers GeoJSON layer is in the correct format with OpenLayers.Protocol.HTTP call

I am completely new to JavaScript and OpenLayers, I am trying to figure out a way to validate the received layer with the OpenLayers.Protocol.HTTP call. I want to validate that it is in the correct ...
3
votes
0answers
490 views

QGIS/GeoJSON: Dissolve featurecollection consisting of polygons and multipolygons into a large multipolygon

I've read this question. I would like to know how to do this in QGIS. I have a Geojson file with a featurecollection, starting with: {"type":"FeatureCollection","features":[{"type":"Feature","...
3
votes
0answers
616 views

Leaflet filtering existing featuregroup

I have a leftleat map and i would like to filter the featuregroup i am displaying. exp_colJSON = new L.geoJson(exp_col,{ onEachFeature: pop_col, pointToLayer: function (feature, latlng) { ...
3
votes
0answers
726 views

Why can't gdal save CRS information to GeoJSON?

gdal fails to add CRS definitions to GeoJSON files in some cases. Try this, for example, from any linux terminal that has gdal installed: # download the data wget "http://giscience.tw.rpi.edu/...
3
votes
0answers
195 views

Can a QGIS GeoJSON vector layer be held in-memory?

When I add a vector layer to QGIS using data in GeoJSON format, data from the server are being displayed. The problem is that every change of the map extent (pan, zoomIn, ZomOut) is causing a request ...
3
votes
0answers
2k views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

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 in the leaflet-overlay-pane? (For example, how could ...
3
votes
0answers
102 views

simple raster format to use in Web applications?

I'm building a Web application in which users create and edit very coarse raster data. They're assigning values to cells in a georeferenced grid. Right now I'm storing the values in a multidimensional ...
3
votes
0answers
1k views

OpenLayers2 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 ...
2
votes
0answers
61 views

Increase the size of overlapping lines in QGIS 3.6

In QGIS I have a layer that is a MultiLineString that has many overlapping lines, which represent driving routes around the city which are generated using OSRM. My data looks something like [ [[a,b],...
2
votes
0answers
52 views

GeoJSON - Obtain linestrings inside a given bounding box

I have two layers in an Argentinian railroad-related project: one is for train stations and the other is for railroad lines. The first one has about 1100 points and the second, about 250 finely-...
2
votes
0answers
50 views

How to draw border for a group of division in a GeoJSON file in python?

I use following code to read a geoJSON file and which is working. GeoJSONN file contains multiple divisions of the map and each of them have a group name in the file. I could add gray border to ...
2
votes
0answers
101 views

Update multiple leaflet locations if value

i have a vehicle tracking api that I am attempting to consume in leaflet. My idea is that is the vehicle driving value is true, then update the location. Ideally, it would be if the location is ...
2
votes
0answers
2k views

SSL handshake error when downloading images

I'm learning the Planet API and going through the tutorials posted online. When I attempt to perform an image search, download, etc. I get an SSL handshake error. Some example commands I am calling ...
2
votes
0answers
292 views

Create Drag Drop Pegman Using OpenLayers 4

Here is a fiddle of my progress: http://jsfiddle.net/pegues/a5mn1ogu/ I've been trying to figure out how to create a drag and drop marker using OpenLayers like what is found with Pegman in Google ...
2
votes
0answers
293 views

Importing GeoJson data to postgresql using ogr2ogr command

I am using following ogr2ogr command to import GeoJson data to Postgres DB. The command runs successfully but the geometry column is null. ogr2ogr -f PostgreSQL PG:"dbname=test user=postgres ...
2
votes
0answers
110 views

GeoJSON files using too much memory?

I have about/more than 400 GeoJSON layer files in my QGIS project. When I checked the task manager memory, it displays qgis.bin.exe *32 using about 1,334,000 of CPU memory. I had another version ...
2
votes
0answers
248 views

Increase rendering speed for the data coming from MSSQL for showing in Leaflet

I have some polygon data which are coming from MSSQL server. Getting these data takes about 5 seconds and I have about 1600 Polygons. I would like to show a popup for each polygon (by clicking on them,...
2
votes
0answers
1k views

(Uncaught SyntaxError: Unexpected token < in JSON at position using openlayers js)

I am trying to insert a map with WFS request from GeoServer with OpenLayers tool but I get this error: Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<...
2
votes
0answers
648 views

Import 3d buildings into Cesium

I have many buildings in CityGML format. Currently cesium does not parse citygml. I tried Geojson and KML formats as in Cesium official tutorials using Sandcastle. In geojson buildings can be seen ...
2
votes
0answers
55 views

PyQgis save geojson with features of different number of properties

I have a stand alone pyqgis application that can load vector map layers. I want to export all of the map layers into a single geojson file. I can do it by creating an all-included QgsVectorLayer, then ...
2
votes
0answers
1k views

How to use GeoJSON from Geoserver in Leaflet?

Is it possible to consume the GeoJSON from Geoserver as a 'dynamic' service in a Leaflet application? So far I have only seen how to consume a static GeoJSON file. Being able to construct GeoJSON ...
2
votes
0answers
2k views

Representing a Shapefile with OpenLayers3

I'm trying to represent a shapefile over an ICC raster map using OpenLayers3. I'm quite new to OpenLayers3 and GIS, so I'm still trying to figure out how it works. So far I've deduced I need to ...
2
votes
0answers
142 views

GeoJSON<->TopoJSON roundtrip breaks leaflet on antimeridean

For Wikipedia, I'm writing a service that extracts polygons of a country by a given ID, simplifies them, and produces GeoJSON. The PostGIS query produces this GeoJSON: {"type":"MultiPolygon","...
2
votes
0answers
98 views

CartoDB.js/Leaflet map - how can I click between multipolygons cleanly?

Here's my map: https://jsfiddle.net/Sidders/4exf969e/3/ I want to apply a click and hover effect to the polygons. So a polygon/multipolygon highlights on hover, and is selected with one click. The ...
2
votes
0answers
628 views

Creating a Goolge Fusion Table with GeoJSON data

I'm trying to import a csv file of data into Google Fusion Tables. Included in the data is column of data that contains a polygon for each row which is defined as GeoJSON. All the data imports without ...
2
votes
0answers
258 views

Unable to load and display data from geoJSON source in OpenLayers

It seems like OpenLayers library changes from day to day and loses compatibility with the previous minor version each time... But, actually, I have another question to ask. The problem I face, is that ...
2
votes
0answers
386 views

Adding multiple divIcons to each point in a GeoJSON - Leaflet

I am trying to add divIcons (SVGs) as markers to a point layer from a GeoJSON in a webapp using Leaflet. I need to have different sized markers at different zoom levels. I have asked related ...
2
votes
0answers
468 views

Searching for UN regions/sub-regions shapefile

for a visualisation project I need the boundaries of the UN regions as defined here : http://unstats.un.org/unsd/methods/m49/m49regin.htm That's 21 polygons for the sub-regions. I have been looking ...
2
votes
0answers
132 views

Combine files in TopoJSON when one is simplified differently to the other

I have two .shp files, I am separately converting these to GeoJSON with ogr2ogr.exe and then combining the files with TopoJSON. Each file independently becomes a ~200kb topojson file, however the ...
2
votes
0answers
646 views

Different Leaflet fillcolors for different layers

I have a leaflet map set up with two layers and I want them to use different colorization functions to color the choropleth shapes. My shapes are set up in layers like this: var povertyLayer = L....
2
votes
0answers
98 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 ...