Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
36 views

Trying to pop up image in GeoJSON file?

I am trying to put an image inside the geoJSON file. I know, that Geojson works as string and I cannot input the image directly, however I found some stuff, like this below: http://www....
2
votes
0answers
41 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. ...
2
votes
1answer
64 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 ....
3
votes
2answers
12k views

Writing style function in OpenLayers?

I am attempting to write a style function within an OpenLayers 3 application that will change the fill color of a circle based on an attribute from a GeoJSON piece of data. I have looked over stack ...
0
votes
1answer
248 views

Reading geojson properties in openlayers 4?

My code is very simple. This is my vector-source and this is how I render my geojson : var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), url: 'some_geojson_is_here' }); ...
1
vote
0answers
40 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
5 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 ...
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
310 views

Load a GeoJSON layer with mixed geometries via QGIS's Python module

I have been able to connect my collection in MongoDB , write and store the collection to as .json file and load the GeoJSON file as a layer by QGIS's Python module unless there are mixed geometries. ...
4
votes
1answer
2k views

Changing point icon (geoJSON) on click and changing back when clicking another point using Leaflet?

I have a geoJSON (10 points) that is drawn using an icon. I want to change the icon when I click on one of the points and then I want to change it back when clicking another point. I don't know how to ...
1
vote
1answer
22 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
38 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
1answer
31 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 ...
1
vote
1answer
42 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 ...
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": "...
4
votes
1answer
693 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 ...
1
vote
1answer
31 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
3answers
2k views

Which style options are available for polylines in Leaflet?

I added a polyline layer as GeoJSON within Leaflet and want to style it. The following options to set the style I could find (and which work) are: color weight opacity What are other available ...
1
vote
0answers
17 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....
2
votes
1answer
2k views

Leaflet popup options with GeoJSON data

In the following how would I customize the popup options? I want to add in the option for the keepInView to be true. var myLayer = L.geoJson(polygon, { onEachFeature: yourOnEachFeatureFunction })....
1
vote
1answer
36 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
62 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 = ...
1
vote
1answer
55 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">...
2
votes
2answers
502 views

Encoding point geometry as GeoJSON? [closed]

I have point geometry in PostgreSQL/PostGIS which I query as follows: SELECT ST_AsText(geom) as pointgeom FROM pointable. I'm using Python as server side script. I want to pass the result as ...
1
vote
1answer
27 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
684 views

Leaflet+GeoJSON: Why are lat-lng coordinates in the wrong order?

I'm coding an app with Phonegap, which requests user's current position. As an overlay I have loaded a geojson layer. I want the app to automatically extract a value of said layer at the exact ...
1
vote
1answer
42 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 ...
2
votes
0answers
63 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 ...
0
votes
2answers
33 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
48 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
1answer
66 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', '...
0
votes
1answer
26 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
328 views

How to display GeoJSON from a URL with authentication in QGIS?

I know I can add a GeoJSON url via the Add vector layer ▶ Protocol ▶ GeoJSON. But I have a URL that requires a username/password. Is there anyway I can provide the username and password for the URL ...
1
vote
2answers
36 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
1answer
35 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
34 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 ...
2
votes
1answer
85 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
1answer
20 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 ...
0
votes
1answer
171 views

Calculating gained elevation on GeoJSON

I need to calculate gained elevation on Multilines GeoJSON files in a Leaflet.js map. Is there is any plug-in to do that? My GeoJSON files contains Z/elevation data in geometry.
1
vote
2answers
107 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
2answers
43 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
258 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
174 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
962 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
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
478 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
65 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 "...