Questions tagged [geojson]

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

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

Shapefile or GeoJSON? [closed]

I'm interested in understanding the relative merits of using GeoJSON or shapefile formats for handling geo-spatial data, particularly in an open-source, Python (CKAN project), web-development context. ...
1
vote
0answers
42 views

Writing more than 1000 rows with arcpy.da.InsertCursor? [closed]

I have a GeoJSON which I'm able to successfully covert to a shapefile via the following process: using arcpy.asShape to find geometry, and inserting this geometry as new fields using cursor insertRow)....
0
votes
0answers
6 views

GeoJSON opening hyperlink to local file in the local aplication instead of browser

I have got a GeoJSON file with link to the local file, which works. How to write hyperlinks to local files in GeoJSON properties? Continuing the question above I would like to have this link sorted ...
2
votes
1answer
75 views

How to write hyperlinks to local files in GeoJSON properties?

I am wondering how to make a hyperlink from GeoJSON file properties to the local drive file. I found two options here: Clickable hyperlink from GeoJSON field in feature this option refers to a whole ....
1
vote
1answer
19 views

Iterating through sub-element `sections` of GeoJSON on a Leaflet map?

I have the following code which I use to display a marker on my map with a popup containing the feature.properties.name element from my GeoJSON: var featuresUTMGroundHazards = L.geoJson(...
1
vote
1answer
26 views

Cast 3D geometry as 2D for ogr2ogr GeoJSON

I'm trying to take a shapefile that can be downloaded here (specifically the shapefile titled PVS_19_v1_vtd_21031.shp), convert it from EPSG:4269 to EPSG:3857, and output the GeoJSON into CSV with ...
0
votes
0answers
47 views

Leaflet GeoJSON legend with custom icons

I have been developed a legend, details are here: Leaflet GeoJSON map legend Now I am wondering how to take into account my custom icons, set for GeoJSON file. var myIcon = L.icon({ iconUrl: '...
1
vote
0answers
30 views

Using ArcPy.AsShape results and converting them to feature class?

I have a GeoJSON that I'm trying to convert to a feature class or shapefile using ArcPy. The original GeoJSON is taken from a web link here: geojson Here's a sample of the GeoJSON: { "type": "...
0
votes
2answers
63 views

Leaflet GeoJSON map legend

I am struggling with creation of the map legend adequate to my GeoJSON stylization. The code looks like below: var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, ...
1
vote
1answer
33 views

Animation does not work GeoJSON date fields in CARTO VL

In CARTO VL linear function expects a date or numeric field as its first argument. But when the data source is a GeoJSON, date fields are stored as categorical/strings and it returns an error like ...
3
votes
1answer
176 views

Converting Entity to GeoJSON with Cesium

I know there is a way to load entities from a GeoJSON using GeoJsonDataSource but is there any way to do the opposite: get any entity as a GeoJSON representation? My goal is to use Turf.JS with ...
1
vote
1answer
35 views

Leaflet load JSON data

Does my code have problem? Because if I run in Visual Studio, it doesn't show error, but the file didn't load on my map. I put the JSON file and HTML on my desktop. This is my code : ...
1
vote
0answers
21 views

Convert polygon co-ordinates to GeoJSON using JavaScript [closed]

I need to convert the below polygon to a GeoJSON object, "Polygon":"146.90805846452713 -42.942663073539734, 147.01517516374588 -42.87627762556076, 147.15525084733963 -42.745309352874756, 147....
1
vote
1answer
74 views

Unable to use fillColor values from GeoJSON with Leaflet

I have a web page which fetches some remote GeoJSON and displays a combination of marker points, polygons and lines on my map. Within that JSON is the fillColor, fillOpacity, etc that I wish to use ...
0
votes
1answer
98 views

GeoJSON search box for multiple layers

I am wondering how to make the GeoJSON search more efficient. I would like to get the search result from more than 1 layer in GeoJSON. My code is (I attached one of two GeoJSON examples): var test = ...
0
votes
1answer
46 views

Search box for GeoJSON in Leaflet

I have been struggling with adding a search box for GeoJSON stuff, similar to COntrol.geocoder in Leaflet. I used the advice under this post: Adding one search box for multiple GeoJSON polygon layers?...
1
vote
1answer
57 views

Load polygon JSON to Leaflet

I want my JSON data with URL can load on the map, and it is a polygon data. I don't know what the problem with my code. This is my code: <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">...
1
vote
1answer
38 views

Extract the coordinates from a GeoJSON file that displays point on my Map in OpenLayers 4

Well I have this GeoJSON file : {"type": "FeatureCollection", "features": [{"id": "1", "type": "Feature", "geometry":{"type":"Point","coordinates":[-5.8039556,35.7903036]},"properties": {"gid":"1","...
1
vote
1answer
57 views

OpenLayers 5: To display the label for a point

In my project there are two GeoJSON point layer, both has the same attribute 'name'. I would like to use this attribute for labeling all points. I've found this similar question but it is for ...
0
votes
2answers
37 views

Leaflet GeoJSON popup marker customization

I would like to customize leaflet .bindPoPup geoJSON marker. I found some solutions, although I would like to use my existing one. Basically the operation leads to merge two functions as per below: ...
0
votes
0answers
9 views

Showing image when clicking on Point in OpenLayers Map? [duplicate]

I have this map: I want to show an image when I click on a point. Every point has its own picture. I am new to OpenLayers. How can i do that after getting the data in GeoJSON?
1
vote
1answer
58 views

Assign the SRID to a serialized GeoJSON

I've created a simple model like this: class AddPoint(models.Model): name = models.CharField(max_length=100) geom = geomodels.PointField(srid=3857) def __str__(self): return self....
1
vote
2answers
64 views

Leaflet GEOJson marker pins are not a Layer?

I currently have the following code which is used to display a series of GEOJson marker pins on a LeafletJS 1.5.1 map and it also displays a KML layer which can be toggled on and off using a checkbox. ...
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 ...
1
vote
1answer
44 views

GeoServer query with GeoJSON

I'm trying to serve a view of my table after passing a GeoJSON polygon. Te idea is get all the points inside my polygon passed as GeoJSON. For this, I've created new SQL view, and a query: select ...
1
vote
1answer
38 views

Highlighting GeoJSON components based on common feature properties

I have a GeoJSON map. It's a map of a country, which is made up of states, which are in turn made up of sub-state regions. I can create a Leaflet map where I can highlight (in this case 'orange') the ...
0
votes
1answer
21 views

Calculate the area of a map using gdalinfo

I'm using gdalinfo to get some information out of a map, and want to use it to calculate the area represented by the map. I'm currently doing it (when the units are given in metres), by multiplying ...
1
vote
2answers
131 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"&...
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 ...
2
votes
1answer
92 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
108 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 "...
0
votes
0answers
71 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 ...
1
vote
1answer
25 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 ...
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. ...
2
votes
1answer
87 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
1answer
84 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 ...
1
vote
1answer
43 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
0answers
32 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
122 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
64 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
0answers
23 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/...
2
votes
1answer
51 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
107 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 ...
3
votes
0answers
71 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
29 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','...
1
vote
1answer
67 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 ...
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 ...
1
vote
1answer
31 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/...
1
vote
1answer
64 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 ...
0
votes
1answer
58 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() ...