Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

Buffering GeoJSON file using Python?

I'm trying to perform a simple buffer on GeoJSON file using Python script. I am able to do it on a shapefile using Python script and on GeoJSON using QGIS fix distance buffer tool but I can't figure ...
1
vote
1answer
58 views

How to add global parameters to Geojson in QGIS?

I have gpx data geojson like below: {"type": "FeatureCollection","features": [ {"type": "Feature","properties":{"time":"2018-03-15T12:22:17.293Z","provider":"network","time_long":"1521116537293","...
0
votes
1answer
494 views

Load multipolygons from GeoJSON into GeoDjango model

I have a simple model: from django.contrib.gis.db import models class CountryShapes(models.Model): geonameid = models.PositiveIntegerField(primary_key=True) geom = models.MultiPolygonField() ...
0
votes
0answers
52 views

Transforming Alaska and Hawaii to be next to USA with TurfJS?

I'm working on an app that contains a map; right now, the map just includes the Continental US, but it would be great if Alaska and Hawaii could be included as well. So far, I've found shapefiles ...
0
votes
0answers
69 views

GeoJSON from react-leaflet doesn't render the layer over the map [duplicate]

I have a GeoServer running on my localhost also I have a react app which consumes a WFS service to get a GeoJSON data to render as a layer over the map. These are my dependencies on my package.json "...
2
votes
2answers
1k views

Display GeoJSON on Leaflet web map with GeoDjango

I have to display my geometry data in my Leaflet based web map and I use GeoDjango to display it, I have loaded GeoJSON data and front map but I can't put my geometry data on my web map. How can we ...
2
votes
1answer
104 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 ...
4
votes
3answers
3k views

Converting large GeoJSON to shapefile?

I have recently downloaded a building footprint GeoJSON file from Microsoft Bing Maps. The file I downloaded was for the entirety of Texas, and is of approximately 2.2 GB file size. They do not ...
6
votes
3answers
5k views

Generating random coordinates in multipolygon in Python?

How to generate random points in multi-polygon using geojson in python ? thus far I found a class in JavaScript named : randomPointsOnPolygon(numberOfPoints, polygon) but I need to use something ...
2
votes
1answer
80 views

Import more than one GeoJSON into Leaflet map?

I've searched far and wide and tried a number of different options but I cannot get more than one GeoJSON into my Leaflet web app. I can get one, and once I try anything else, the map itself will go ...
0
votes
0answers
11 views

showing GeoJSON result on googlemap [duplicate]

I want to get some point (in Geometry type) from my sql database with AJAX and show them on googlemap my table name is location_flat which has a column named position conatained my geometry points. ...
0
votes
1answer
54 views

Showing GeoJSON result on Google Maps [closed]

I have some points result query in MySQL database which is GeoJSON and I want to show these points on a Google map. I need to get this result with AJAX and deliver them to Google Maps. Can anybody ...
0
votes
0answers
30 views

GeoJSON matching, changing color and zooming element in OpenLayers?

I'm trying to look for matching in the geosynthe loadloaded on openlayers when a user clicks on a button in that table then the button sends the element id and I want to color it in another color and ...
2
votes
0answers
97 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 ...
1
vote
2answers
108 views

Convert GeoJSON directly to geodatabase

I'm looking for a way to convert a GeoJSON File (from overpass-turbo.eu) directly into a Feature Class in an Esri geodatabase. Normally I'm doing this by loading the GeoJSON into QGIS, Export it to a ...
1
vote
0answers
27 views

Transformation issue with SVG to GeoJSON conversion

I have a vector image in SVG format. (without georeferences) I am trying to display it using OpenLayers to display properties of different polygons in it. I tried converting it to GeoJSON but the ...
1
vote
2answers
60 views

Why is the order of my features changed when using readFeatures in OpenLayers v4.6.5?

I have a geojsonObject that is a featurecollection of X number of features. see picture I Then add this to a vector: var Source = new ol.source.Vector({ features: (new ol.format.GeoJSON())....
0
votes
1answer
45 views

Using getmapasync() function instead of getmap() function in Android to plot GeoJSON file?

This is the code that I have used to plot GeoJSON file in Google Maps in Android: mMap = googleMap; SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() ...
0
votes
0answers
22 views

Consume a GeoJSON service from GeoServer in QGIS 3.4?

It seems there has been an update to the way QGIS consumes GeoJSON files in version 3.4x At 2.18.x, a WFS service with GeoJSON output from GeoServer such as: https://server.org/geoserver/datastore/...
-1
votes
2answers
1k views

Loading external local GeoJSON file in OpenLayers?

How do I load GeoJSON file, which is in my laptop, into my HTML code to include some features into my OpenLayers map?
0
votes
3answers
1k views

Mapbox Feature icon-rotate as symbol

I have a requirement to enable a user to Rotate a single feature they've added to the map. The feature is part of a geojson FeatureCollection and styled as a symbol with layout properties. Obviously ...
2
votes
2answers
6k views

Creating Google Maps Polygon from Data Object Using getFeatureById

First post here, so forgive me if I put a few things in the wrong place. I am trying to do a Google Maps search for places inside an arbitrary region loaded into a Data object loaded via GeoJSON file,...
2
votes
1answer
48 views

Set default coordinate precision

Is there a way to set the default coordinate precision to 7 for GeoJSON files in QGIS? This would help me save time when I go to save files.
0
votes
0answers
79 views

Python - Issue to create choropleth map based on GeoJSON file: AttributeError

I'm trying to build a choropleth map, I cannot figure out why I get this error: AttributeError: 'NoneType' object has no attribute 'get' Here is my code: station_nb is a dataframe with values ...
0
votes
1answer
39 views

How can I add dynamic text/properties to a GeoJSON multipoint on each individual feature?

I'm drawing circles on a map based on lon/lat. These circles are drawn from "subarrays" in an array, e.g: myArray = [[array(18)]],[array(111)], [array(65)]....] I map each of these arrays using ...
6
votes
1answer
806 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) ...
1
vote
1answer
59 views

GeoJSON layer shows/enables only one row in attribute table in QGIS

I have a GeoJSON polygon layer which I converted from a shapefile layer. The layer opens up in geojson.io, for example, with no problem, displays the table correctly, etc: However, in QGIS the ...
1
vote
1answer
65 views

Mimic in-line GeoJSON using fetch()

For simplicty, referencing this example: https://carto.com/developers/carto-vl/examples/#example-load-external-geojson-layer I would like to have this bit of code behave the same as through it were ...
3
votes
0answers
67 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. ...
1
vote
1answer
60 views

Exporting GeoJSON from PostGIS?

I am, trying to export GeoJSON from postgis. I am using the following code which is working local machine but when I am trying to use this in a server the following error is occuring CODE: ogr2ogr ...
1
vote
1answer
25 views

Using custom marker name in Leaflet from external GeoJSON file

I have the following code (which works great): <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" integrity="sha512-xwE/...
0
votes
1answer
1k views

Where to find GeoJSON data for the UK?

I want to get GeoJSON data for the UK. The regions which I require are in the map displayed in the below link: Former Government Office regions I have been searching the net but all in vain. Can ...
12
votes
7answers
20k views

Source for GeoJSON data for the US

Does anyone know of any good sources for US data (counties, congressional districts, etc) in GeoJSON format? Has anyone converted public-domain shapefiles/sources to GeoJSON that they would be willing ...
2
votes
1answer
64 views

GeoJSON files being saved without line breaks

Why are my GeoJSON files being saved without line breaks? Why are they missing the proper formatting? All features in the file are being saved in the same line. I'm using QGIS 3.6.3. Here is what I ...
2
votes
1answer
72 views

Non-interactive points in Leaflet

I do have a point layer (data from a GeoJSON) and a polygon layer (also GeoJSON) in Leaflet. Both layers are created the same way and I made both layers "non-interactive". Unfortunately the point ...
2
votes
1answer
102 views

Access geometry.coordinates of sliced vector grid

I am trying to represent LineString GeoJSON as vector tile layer using Leaflet.VectorGrid. But i need to do some interactive by clicking on vector tile layer. but this vector tile layer has came with ...
0
votes
0answers
42 views

SVG to GeoJSON conversion - incorrect render [duplicate]

I have a vector image in SVG format.(without georeferences) I am trying to display it using OpenLayers to display properties of different polygons in it. I tried converting it to GeoJSON but the ...
1
vote
1answer
53 views

Erasing a part from a line-GeoJSON

Consider the following line (GeoJSON): { "type": "FeatureCollection", "name": "longline", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": ...
2
votes
2answers
86 views

Setting Labels on Vector features in OpenLayers 5

I am following this very big example to set labels on the style of the vector but it's confusing. The labels should be the Plot numbers, of each feature, which come from the JSON file. Also i have ...
4
votes
1answer
4k views

Serialize python list containing geometry

In simple case if list doesn't contains geometry all works fine: result = [dict(f.fields, id=f.id, label=f.label) for f in features] json.dumps(result) But if result list contains geometry (Shapely) ...
1
vote
1answer
416 views

Mapbox GL JS compressed GeoJson files?

I am currently using Mapbox GL JS and pull multiple GeoJson files from the style.json file. Each file in about 10MB and takes too long to load. Is there a way to compress the files and uncompressed ...
1
vote
1answer
135 views

Manipulating polygon data imported from Google BigQuery GIS within R

I have some polygon shapefiles (representing UK postcodes) which I have uploaded to BigQuery, using this guide, hoping to take advantage of the inbuilt GIS support described here. I am trying to ...
3
votes
1answer
420 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 ...
0
votes
2answers
230 views

Changing Color and Opening Label on Hover

I'm initializing GeoJSON markers in Leaflet, and I'm trying to change the color and open a label on mouseover. Upon mouseout, I want to change back to the default color and close the label. However, ...
1
vote
1answer
48 views

Reproducing Difference operation from QGIS in pure Python?

I have two GeoJSON files and I want to make the difference of those two layers, QGIS does it really well, but I need to do it in pure Python 2.7. Anyone know how to do it ?
0
votes
0answers
28 views

Import GeoJSON in QGIS with file name as layer name?

When I add a GeoJSON layer to my QGIS project, it always gets the name "filename name_field_value". For example, file named CZ0100554782.geojson is as layer in QGIS named "CZ0100554782 Praha" I ...
0
votes
1answer
67 views

Quick Import FME Reader Gallery Not Populated with FDS (ArcGIS 10.5 Adv Licence)

I wanted to import GeoJSON files, but after installing the Background GP and Data Interop packages, I find that the FME Gallery contains only GML and WFS formats. This is with both ArcGIS 10.4 and ...
1
vote
0answers
85 views

Blur all other area outside polygon in mapbox-gl

I am trying to create an effect like Can view it by adding feature from fiddle in http://geojson.io/#map=14/46.9597/7.1446 when added the feature in mapbox as geojson layer of mapbox-gl I am getting ...
-2
votes
1answer
61 views

WFS display problem using GeoServer and OpenLayers

I know a lot of issues have already been posted about this tricky situation, but I can't figure out where is the problem in my script and most of the discussions about OpenLayers are outdated. I'm ...
0
votes
0answers
30 views

Convert Mapbox vector tiles to GeoJSON in browser

Although Mapbox's vt2geojson is fine for node use, I need to convert vector tiles to JSON in the browser. I haven't found a browser based solution for this. Is there one? Possibly the solution is ...