Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
25 views

Add popup with GeoJSON data

I want to display popup with the data item, such as: name, coordinates, stationID, Attribute. But my code has some problem that can't run. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml"&...
0
votes
0answers
34 views

Show points (layer) from PostgreSQL database on OpenLayers map

I have this code, I want to load a collection of points stored in a table in PostgreSQL database, I retreive the GeoJSON format succesfully, but the points never show up on the map! The three files ...
0
votes
0answers
28 views

GeoJSON not rendering at geojson.io [on hold]

I might miss something really stupid but do not see the forest because of trees. Following GeoJSON: https://hastebin.com/lelaratoca.json? is showing nicely in QGIS as EPSG 3857 Pseudo Mercator. ...
0
votes
2answers
35 views

Using ogr2ogr for converting tables from non-public schema to GeoJSON

I've used ogr2ogr to convert tables in PostgreSQL database to GeoJSON which works fine for the public schema. The question is how can I set the schema to non-public to access my tables? I've already ...
0
votes
1answer
229 views

Getting width of road segment given its end points using Leaflet?

I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...
0
votes
1answer
166 views

Select a feature by property

I have a GeoJSON layer with continents info (got it from here), and I want to select a feature(continent) based on its name value or "CONTINENT" in this case. I did some research and ended up with ...
0
votes
3answers
710 views

Filtering interactive leaflet-map with dropdown-menu?

I try to set up a filterable "shot chart" like http://graphics.latimes.com/kobe-every-shot-ever/ with leaflet. I've a geojson file thats stores all the shots data, I've them showing up in a layer. ...
4
votes
1answer
1k 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
54 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","...
2
votes
0answers
16 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 ...
0
votes
0answers
25 views

GeoJSON doesn't display on GeoServer [on hold]

I wish to add TMS/WFS source into my frontend. But I had a problem with rendering layer in OpenLayers. So I have found that GeoJSON of my caching layer doesn't display in the OpenLayers viewer on ...
0
votes
1answer
352 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
23 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
18 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 ...
1
vote
1answer
16 views

Adding data from KML/shapefile/GeoJSON to OSM nodes

I have data of streets which is marked with the osm way/node ids. I would like to add speed limit data which is available in KML, shapefile, or GeoJSON to these OSM wayids (OSM wayid with start node ...
2
votes
1answer
101 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
2k 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 ...
5
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
67 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
10 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. ...
1
vote
1answer
39 views

Transform HTML area to GeoJSON

I have this file http://www.meteofrance.com/mf3-rpc-portlet/js/datas/zones_AVDEPT73.json where the "zone" field is put in an area HTML element (so does "shape"). I have a little script that takes the ...
0
votes
1answer
38 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
25 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
52 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
48 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
24 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
54 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
36 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
20 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
43 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
35 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
37 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 ...
5
votes
1answer
748 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
46 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
49 views

Join a CSV file to GeoJSON using ogr2ogr in a Python script?

I have a CSV which I would like to join to a GeoJSON. I found this answer which I tried to implement but I can't get it to work just yet. Here's an extract of my python: join_command = ['ogr2ogr', '...
1
vote
1answer
53 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
60 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. ...
0
votes
1answer
21 views

Format GeoJSON use Join method before export in Earth Engine

After filter an LANDSAT-05 for an small area var Collection = function(pixel) { var colForPixel = ee.ImageCollection('LANDSAT/LM05/C01/T1') .filterBounds(pixel) .filterMetadata('CLOUD_COVER','...
2
votes
1answer
22 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 ...
1
vote
1answer
53 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
20 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
62 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
41 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 ...
1
vote
1answer
61 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 ...