Questions tagged [geojson]

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

319 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
471 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
548 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
1answer
153 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
1answer
714 views

Extract multiple admin levels from planet OSM

I am trying to create a multi-level choropleth map based on OSM data. I need the outline/boundaries. I would like to do this from the command line if possible. Here is what I think the steps ...
4
votes
0answers
156 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
759 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
712 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
3answers
67 views

How to convert an OSM relation to a list of lat/lng points?

I would like a convert a relation (e.g. https://openstreetmap.org/relation/2851613) to a list of coordinates that can be displayed on a map, potentially using geojson. I ported over this converter ...
3
votes
0answers
70 views

Why an extra iteration on the first feature of a GeoJSON layer?

I'm using Python and GDAL to iterate over the features in a GeoJSON layer and I'm seeing this strange behavior where the first iteration is repeated a second time before moving onto the next feature. ...
3
votes
0answers
181 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
345 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 ...
3
votes
0answers
62 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
124 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
420 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
2k 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 ...
3
votes
0answers
244 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
2k 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
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
413 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
2answers
479 views

GeoJSON data not getting displayed on Openlayers map in Geodjango

I have the following code. models.py class PFT(models.Model): species=models.CharField(max_length=50) geom = models.PointField(srid=4326) objects=models.GeoManager() def __str__(...
3
votes
0answers
2k 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
210 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
542 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
647 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
767 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
200 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
1answer
429 views

Receiving data from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
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
106 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
24 views

JSON file fails to open

I have a file that has no extension. This file resides on an internal web server and it's called by a web map application based on django python. It looks like : > {"crs": {"properties": {"name": ...
2
votes
0answers
65 views

Esri mapview USGS earthquake trigger popup from outside of map

I am trying to show some recent earthquake information in Esri maps using USGS earthquake API data. I am able to fetch the list from API data and also I got the map with those listed information ...
2
votes
0answers
121 views

Converting GeoJSON file to vector tiles

I need to display huge GeoJSON file using OpenLayers. So I decided to use VectorTiles. Library geojson-vt.js works perfectly for me, but unfortunately it requires my GeoJSON file to be preloaded on ...
2
votes
1answer
43 views

Get geometry type from Feature Collection for every row

I want to get geometry type for every row (like point, linestring, polygon etc.) from GeoJSON data. This is my code for reading data. import argparse import geopandas as gpd import os import sys ...
2
votes
0answers
42 views

Creating GeoJSON REST service

I'm trying to create a GeoJSON REST service from a PostgreSQL connection. First I fetch GeoJSON as a string from PostgreSQL: import java.util.*; import java.sql.Connection; import java.sql....
2
votes
0answers
68 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
132 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
56 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
2answers
2k views

Add a vector GeoJSON layer in OpenLayers 5.1.3

I am trying to add a simple capitals GeoJSON vector layer to my map for basics learning, without managing to get it to work. I spent hours of roaming the documentation API. As follow is my script: ...
2
votes
0answers
129 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
1answer
1k views

Combine multiple dynamic Leaflet filters

I'm very new to Leaflet and made a map using a GeoJSON Layer. I'd like to filter points from the GeoJSON Layer by a checkbox input. If I consider only one Parameter (Par1) with levels A, B and C I can ...
2
votes
1answer
106 views

Coordinates in GeoJSON file lost their decimals when opening in QGIS

When open the following GeoJSON file in QGIS 2.18 (drag and drop) , all point coordinates lost their decimals going, for example, from -9.350659, 44.32844 to 9, 44 . Same file is correctly shown by ...
2
votes
0answers
3k 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
1k views

Save Leaflet drawn features with attributes to PostGIS

Goal: In order to have a fully interactive map, I would like to be able to save some drawn features (in a second step with some attributes that may be grabbed through an input mask form or pop-up) on ...
2
votes
0answers
348 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
119 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
275 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 (<...