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
7
votes
2 answers

Getting geojson linestring from MySQL geometry WKT data

I'm trying to get GeoJSON linestring format using awesome PHP-Database-GeoJSON library from here https://github.com/bmcbride/PHP-Database-GeoJSON but for now without any luck I was successful with calling simple points from MySQL table using that…
Svinjica
  • 2,389
  • 2
  • 37
  • 66
7
votes
4 answers

Zooming into State to view ZipCode using R Leaflet

I am using R leaftlet package to create a interactive choropleth of the U.S. There are several tutorials online and I am able to create interactive state level map with popups and zooming. Also I was also able to create a separate zip code level map…
user2961712
  • 469
  • 1
  • 7
  • 17
7
votes
1 answer

Reducing border width of Leaflet polygon

When adding a polygon to a Leaflet map, the border is quite wide (dark blue in image below). For maps of a wide area, this often obscures finer details of the map underneath. Is it possible to reduce the width of the border, while retaining the…
Peter
  • 1,674
  • 4
  • 27
  • 44
7
votes
3 answers

Match a GeoShape/Polygon document with a GeoPoint query in ElasticSearch

I would like to match any document in the ES index where a point is within the document polygon geo_shape type. So basicly, I'd like to query for a point (ie. [2.934211, 42.522377]), and get a match with all the documents where the polygon…
DJP
  • 73
  • 1
  • 4
7
votes
3 answers

Convert features of a 'multifeature' GeoJSON into R spatial objects

Normally you can read geojson files into R with trusty readOGR, as illustrated here. However, this fails for multifeature geojsons. Reproducible…
RobinLovelace
  • 4,799
  • 6
  • 29
  • 40
7
votes
1 answer

Including a GeoDjango Point in a model

I am working with GeoDjango for the first time and am having trouble adding a PointField to my model. Here is my model code: from django.db import models from django.contrib.gis.geos import Point from django.contrib.gis.db import models class…
snorkelzebra
  • 663
  • 1
  • 7
  • 17
7
votes
2 answers

Variable Polyline Weight with GEOJSON in Leaflet

Here is the entire HTML document: Top 5 Importers of Tungsten
7
votes
1 answer

Animation of features in OpenLayers3

I was curious about the possibilities of animating features in OpenLayers3. I'm very aware of the examples presented here http://openlayers.org/en/v3.0.0/examples/animation.html and…
stopopol
  • 486
  • 7
  • 29
7
votes
2 answers

Load geojson in bigquery

What is the best way to load the following geojson file in Google Big Query? http://storage.googleapis.com/velibs/stations/test.json I have a lot of json files like this (much bigger) on Google Storage, and I cannot download/modify/upload them all…
Boris
  • 1,093
  • 2
  • 14
  • 22
7
votes
3 answers

Load geoJson in MapBox for editing with Leaflet.Draw

I try to load geoJson data in Mapbox and edit it with the plugin Leaflet.Draw Here is an example : fiddle var featureGroup = L.featureGroup().addTo(map); var geojson = { "type": "FeatureCollection", "features": [ ........... …
manusvs650
  • 241
  • 2
  • 6
7
votes
2 answers

Rendering only a portion of a topojson map using D3.js

I'm using the D3.js library to create maps from US Census shapefiles. I'm looking to create an entire US map, which is no problem, and a map for each state. My workflow uses the census data, altered as necessary by ogr2ogr at the command line, then…
kgilvi3
  • 305
  • 3
  • 12
7
votes
2 answers

Return GeoJson with Django

I am trying to return a set of coordinates to draw points/rectangles over a map. Currently I'm using Polymaps, but I'm thinking about moving to openlayers, which has examples more clear for a javascript newbie like me. I want to send a list of…
Roman Rdgz
  • 12,836
  • 41
  • 131
  • 207
7
votes
3 answers

D3: Finding the area of a geo polygon in d3

I've got a map that uses a geoJSON file to draw the countries. I then want to draw a circle centered on each country. But for countries with several bounding regions (the US has mainland, Hawaii, Alaska) I want the circle on the largest bounding…
ACPrice
  • 667
  • 2
  • 10
  • 25
7
votes
1 answer

d3.js geoJSON and bounds

I have successfully loaded geoJSON files loaded the feature collection into a d3.geo.path() The problem with my current implementation is that it starts off the scaling such that the path is a point, and I have to zoom in each time. Now I know…
Justin
  • 287
  • 3
  • 11
7
votes
1 answer

Render as GeoJSON (or selectively as WKT/WKB) using MIME-Types

I have Rails with PostGIS, activerecord-postgis-adapter and rgeo-geojson running. At the moment I can use default "object.json" URLs to get a JSON string with WKT/WKB format. It looks like this: {"description":null,"id":1,"position":"POINT (10.0…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201