Questions tagged [geojson]

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

449 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
2k views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT '...
5
votes
1answer
116 views

Fetching the on-click data from the website into QGIS

I would like to fetch the on-click data into QGIS and show them as the placemarks. Basically the issue comes from i.e this website: https://eclipse.gsfc.nasa.gov/SEgoogle/SEgoogle2001/...
5
votes
0answers
2k 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 ...
5
votes
0answers
845 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 ...
4
votes
0answers
830 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
1k 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 ...
3
votes
0answers
49 views

Returning TopoJSON from server compressed

I am using TopoJSON Server for my geo Spatial project. By executing the geo2topo (version 3.0) conversion from GeoJSON to TopoJSON on the server side back to the caller of an endpoint that normally ...
3
votes
0answers
36 views

Problem showing a country with non contiguous border

I am generating maps using Google Static API. Due to browser size restrictions, I am doing a polyline encoding, using an online polyline encoder. The encoder takes long,lat with a line break. Most ...
3
votes
0answers
286 views

Converting GeoJSON to ISOXML ISOBUS ISO 11783-10

How do I convert some GeoJSON files to ISOXML files (ISO 11783-10)? I found several questions on this topic: Converting GeoJson/Shp to Iso-xml (ISOBUS ISO 11783-10) https://stackoverflow.com/q/...
3
votes
0answers
55 views

Exporting a layer with one-to-many non-spatial relationships into GeoJSON

I have a ShapeFile (postcode areas) with a one-to-many relationship with a list of attributes (customers who fall within that postcode). Is it possible in QGIS to export the ShapeFile to GeoJSON to ...
3
votes
4answers
598 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
750 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 ...
3
votes
0answers
171 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
209 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
2k 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 ...
3
votes
0answers
460 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
63 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
128 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
542 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
298 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
3k 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
518 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
694 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
1answer
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
254 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
658 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
696 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
872 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
210 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
3k 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
110 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
19 views

Converting SVG files to GeoJSON

I am struggling with converting SVG files (with geographic coordinate metadata) into a GeoJSON file. I have been trying the svg2geojson command line util and online conversion tool MyGeodata Cloud. ...
2
votes
1answer
34 views

Exporting a group of raster layer bounds from QGIS to a GeoJSON

I have a QGIS project with a lot of raster layers; and I want to build a Mapbox map based on this project; that would display those images on a website's map. I need a way to export a group of raster ...
2
votes
0answers
38 views

GeoJSON format (Geography) for posting in Postman tin PostgreSQL

I am trying to do an update posting on Postman for the first using PostGIS / Geography file type and I don't know where I am going wrong. I have included the model below of the table in pgamdin 4 / ...
2
votes
0answers
25 views

Upload of geojson to Mapbox studio showing strange artifacts

I want to upload Geojson data to Mapbox studio. The upload works correctly, but the data in Mapbox show artifacts, which do not exist in the original data. It seems that some vertex has a wrong ...
2
votes
0answers
49 views

Add altitude coordinates in Feature Collection then serialize to GeoJSON

I deserialized a GeoJSON file into a feature collection using GeoJson.Net. Then I get the feature from the feature collection. Inside the feature I can loop and get all the type of geometry. From ...
2
votes
0answers
72 views

Using GeoJSON Services in Arcade Expression

I am trying to use an Arcade expression with GeoJSON services in a map using the ArcGIS Javascript API. The intent of the Arcade expression is to return a count of lakes that intersect a county that ...
2
votes
0answers
302 views

How to convert GeoJSON points to H3 hexagons in Python

I am trying to take a geojson file of points and convert it to H3 hexagons in my Python script. In JavaScript, there is a separate package called geojson2h3, but the Python h3 module has a method ...
2
votes
0answers
21 views

Polygonize RGB mage considering all 3 bands simultaneously

I'm using the rasterio.features.shapes method to generate GeoJSON information from a PNG file. This answer shows what I'm trying to do, except I need to analyze the RGB bands simultaneously otherwise ...
2
votes
0answers
33 views

What do the numbers in the intersection Matrix in the JTS TestBuilder mean?

What do the numbers in the intersection Matrix in the JTS TestBuilder mean?
2
votes
0answers
27 views

Generalization with GRASS explodes number of polygons that are exported to GeoJSON

I have a shape file containing polygons with 10 geographical districts that together form a city, which I want to generalize without "sliver" artifacts and export to GeoJSON. When running this vector ...
2
votes
0answers
155 views

Street traffic flow (from Azure Map GeoJSON) to OpenStreetMap street network (graph)

The Ultimate Goal: I am trying to find the shortest and least traffic path between two points for a given pair of latitudes and longitudes on the map. This is rather standard in most of the maps, but ...
2
votes
0answers
86 views

MapServer merging features from layers in Template-Driven Output

I want to get WMS GetFeatureInfo result in GeoJSON format from MapServer. Result should be valid GeoJSON FeatureCollection containing array of features from one or more layers. I use Template-Driven ...
2
votes
0answers
230 views

How to load .geojson file w/ properties and polygons into SQL table?

I have an Azure SQL table: -- Create the table in the specified schema CREATE TABLE dbo.geoTest_DEV ( fAssetId INT IDENTITY(1,1) NOT NULL PRIMARY KEY, fAssetGeoId [NVARCHAR] (50), ...
2
votes
0answers
57 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
91 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
226 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
134 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],...

1
2 3 4 5
9