Questions tagged [geojson]

GeoJSON is an open format, based on JSON, for encoding geographic data.

GeoJSON is a geospatial data interchange format based on JSON. It defines the following geometries:

  • Position
  • Point
  • MultiPoint
  • LineString
  • MultiLineString
  • Polygon
  • MultiPolygon
  • GeometryCollection.

Example of a GeoJSON Point:

{ 
    "type": "Point",
    "coordinates": [0.0, 0.0]
}

Resources :

4307 questions
9
votes
1 answer

Rails 4 Nested Array in Nested Object in Strong Parameters

This question answered my question partly. The author uses a similar json structure.. My Question: How to permit nested arrays in a nested object? I have a Contribution model with has_many Features. I am trying to create GeoJSON polygons. The…
ubergesundheit
  • 544
  • 1
  • 4
  • 13
9
votes
3 answers

Leaflet Popup with additional information from GeoJSON

I want to bind the additional information from geojson to a leaflet marker popup. I looked up a few things from the leaflet documentation but it doesn't work. var map = L.map('map').setView([51.9, 7.6],…
juhnz
  • 111
  • 1
  • 1
  • 4
9
votes
5 answers

Where to find the UK's regions map on GeoJSON format

I am trying to get the uk's regions map, http://en.wikipedia.org/wiki/Regions_of_England, on GeoJSON format to use it on a web visits map on a website. Is there any place where you can get the data for different countries on GeoJSON format?
Carlos
  • 480
  • 1
  • 5
  • 10
9
votes
2 answers

Ajax call to get GeoJson data from ASP.NET MVC Controller

Using ASP.NET MVC 3 with C# I have a web page to display a map onto which I want to add a polyline consisting of several latitude and longitude coordinates. With the Leaflet JavaScript library you can add GeoJson layers. I want to get the longitude…
Dimitry
  • 71
  • 1
  • 6
9
votes
0 answers

GeoJSON for floor plan

While evaluating different technology to represent an office floor plan (so, basically 3d geometry data and 2d representation), I came across many new javascript package for client side representation. I see suggestion to use openlayers.org, but…
bsr
  • 57,282
  • 86
  • 216
  • 316
8
votes
2 answers

GeoJSON: Are Properties allowed in FeatureCollection?

I could not find any relevant information in the spec: http://geojson.org/geojson-spec.html Is it allowed to have a properties key in a FeatureCollection? Or is it only possible for Features? If it's possible, how can I access the properties within…
jllodra
  • 1,348
  • 1
  • 14
  • 22
8
votes
1 answer

React-leaflet geojson onEachFeature popup with custom react component

I am trying to render custom react component in react-leaflet GeoJSON onEachFeature popup, e.g. to fire modal with all corresponding feature.properties. In a popup react-leaflet component it works great Some text
astricus
  • 83
  • 1
  • 3
8
votes
3 answers

Convert lat long into geojson object

How can i convert my lat and long value into geojson object. I work on php platform.
Ashish Pethkar
  • 1,558
  • 4
  • 12
  • 10
8
votes
1 answer

How do you add GeoJsonTooltip to folium.Choropleth class in folium?

I have two choropleth layers in which I would like to add GeoJsonTooltip to but I keep receiving error TypeError: __init__() missing 1 required positional argument: 'text' My current code is as follows. import folium import pandas as pd import…
prime90
  • 889
  • 2
  • 14
  • 26
8
votes
3 answers

convert geoJson data to sql server spatial data type (GIS)

I've downloaded from openstreetmaps administrative borders (city, region, country, etc...) in geoJson format. I'm trying to store the json data related to the polygons in my ms sql server using spatial data. Since I've never parsed such a complex…
Carlo Luther
  • 2,402
  • 7
  • 46
  • 75
8
votes
1 answer

Django SerializerDoesNotExist 'geojson'?

I'm trying to serialize data in the geojson format however whenever I use json = serialize("geojson", coordinate.objects.all()) response = HttpResponse(json) return response django gives me SerializerDoesNotExist at /getmarkers/ 'geojson' this…
Groovietunes
  • 633
  • 1
  • 9
  • 17
8
votes
2 answers

Draw GeoJson in Apple Maps as overlay

Can someone tell me how can I draw a GeoJson file as an overlay in apple maps? I want a complete example, I have the shapes as Polygons or MultiPolygons? This file Countries GeoJSON is enough for me if you provided me with a code or a library to use…
mohamede1945
  • 7,092
  • 6
  • 47
  • 61
8
votes
3 answers

Layer order changing when turning layer on/off

I have two geoJson layers being loaded - both layers are the same data for testing purposes, but being drawn from two different json files. When I turn the layers on and off in the layer controller, the draw order of the layers change. Any ideas why…
Lee
  • 93
  • 1
  • 5
8
votes
2 answers

JS leaflet: How to pass (Geo-)json ID to on click event?

My django web app should do the following: Pass a Geojson object to a view, map the points with leaflet and display some additional information when the user clicks on a point marker. I'm not so familiar with js so I got stuck binding the right kind…
LarsVegas
  • 6,522
  • 10
  • 43
  • 67