Tagged Questions

An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

2
votes
3answers
479 views

GeoJSON generator with OpenLayers support

Is there a service that allows me to draw on an OpenLayers map, and see the resulting GeoJSON?
3
votes
1answer
3k views

How do you put GeoJSON attribute information in a popup with OpenLayers

I am having some trouble putting GeoJSON attribute information in a pop-up. The selection control is working, and I create an alert (for testing) and this is working. But I can't figure out how you ...
2
votes
2answers
3k views

How to label GeoJSON polygons?

I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from feature.properties.name This is my code where I ...
4
votes
2answers
388 views

How to remove redundant points

We basically have points table including vehicle routes.In huge traffic conditions,devices collecting data on route may output redundant points where at any coordinate same points may repeat.We can ...
6
votes
1answer
197 views

How do I represent the whole Earth as a Polygon?

This is related to determining the interior of a Polygon. My difficulty is that if I specify a Polygon covering the Earth going from East to West, it will still have a boundary along the ...
-1
votes
2answers
212 views

Go to the URL on click with GeoJSON

I'm using Leaflet API and geojson. I defined a function which zooms to the feature when clicked: function zoomToFeature(e) { map.fitBounds(e.target.getBounds()); } function ...
8
votes
2answers
1k views

How to reduce the file size of GeoJSON data?

For my project I am trying to convert the tiger shapefile information for us states into GeoJSON format However when I use the ogr2ogr tool the data file is about 20 MB. I have seen the geoJSON file ...
1
vote
0answers
379 views

translating and scaling viewport to fit geojson map in D3js

I am trying to load a map of Rio de Janeiro (Brazil) in GeoJson for with D3js the code and the map is here: https://gist.github.com/4157853 I can open the map normally with Qgis, but with d3js ...
1
vote
1answer
2k views

How can I add an infowindow to an OpenLayers GeoJSON layer?

In my OpenLayers script I refer to an geojson layer. Is it possible to add an info window?If yes, how can I create this. Script is as follows: var lon = 5, lat = 52, zoom = 7, epsg4326 = ...
7
votes
2answers
3k views

Generating GeoJSON with Python

Hi I want to programatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile: def ...
2
votes
2answers
654 views

How to Merge/Join GeoJSON and JSON?

I want OSM administrative boundaries from http://global.mapit.mysociety.org/area/14455.html. I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I ...
2
votes
1answer
462 views

GML and GeoJSON vector layer can not display in Firefox and Chrome

I have following codes. It works perfectly in IE (GML and GeoJSON vector layer was loaded), but not in Firefox and Chrome without any errors noticed. Please help me to fix this problem. Here is the ...
10
votes
3answers
5k views

How to create a GeoJSON that works with D3?

I'm simply trying to convert a .shp file to a geoJSON format using: ogr2ogr -f geoJSON output.json input.shp After executing the command nothing seems to be wrong. Here's an excerpt from the ...
5
votes
1answer
3k views

Auto zoom on multipolygon with leaflet

I have a geojson with a multipolygon and I want to fit this multipolygon to the map. The map center only on one polygon not on the multipolygon. Here is my script var map = L.map('map',{ ...
2
votes
2answers
2k views

leaflet and geojson tiles

New to mapping. Trying to create a heat map with data that updates every hour for US Counties with leaflet.js similar to http://leaflet.cloudmade.com/examples/choropleth-example.html. But, adding ...
2
votes
1answer
571 views

formatting geojson from postgis data using node.js

I am trying to build a GeoJSON object from a SQL query to some GIS point data in a postgis postgresql database. A snippet of my node.js app.js is below. As it stands I understand building the type ...
2
votes
1answer
164 views

Is it necessary to add Tile layer background?

Is it necessary to add tile layer for making a GeoJSON data rendered in web browser using Leaflet or any other API ? I have a geoJSON data (I obtained the GeoJSON data by converting .shp file to ...
5
votes
2answers
2k views

Create multiple vector layers by reading a GeoJSON file once in OpenLayers

I am a begginner to OpenLayers, and my question is about making things more efficient. My work is about displaying time-dependent weather elements on several point locations on the map. All these ...
1
vote
0answers
795 views

searching GeoJSON features

After googling for many days and reading the OL documentation, I don't understand well how the filterToParams in OpenLayers.HTTP protocol should work, what I'm trying to do is to find and display the ...
2
votes
1answer
1k views

Mapping x, y pixel coordinates to latitude and longitudes on the WGS84 datum

Apologies in advance for the long question, I am fairly confused at this point and I figure if I show my thought process any flaws early on in the piece can be more easily pointed out. I have a grid ...
3
votes
1answer
507 views

Change Layer name when converting from GeoJSON

I am converting GeoJSON files to other formats (including KML) using ogr2ogr. As you may know, there is no field in a GeoJSON file to specify the name of the layer, causing every conversion to have ...
2
votes
2answers
680 views

Exporting OpenLayers.Layer.WMS to GeoJSON / KML

I'm looking the way to exporting an especific region of a WMS layer to some XML format (GeoJSON, GML, KML) using OpenLayers and Geoserver. I've found how to export features objects with ...
4
votes
1answer
2k views

How to add a geoJSON layer to leaflet map?

i am newbie in leaflet & its geojson features... I am trying to test leaflet's functionalities. In fact i have built a map and its layer: var map = new L.map('map', {scrollWheelZoom:true, ...
0
votes
1answer
398 views

Vector layer shifted on OSM map: why?

I've defined the following map: Proj4js.defs["EPSG:31258"] = "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel ...
2
votes
1answer
242 views

Which OpenLayers.Protocol should I prefer which design patterns provided at?

At our scenario, there is a server which stores the feature info (coordinates, properties, etc) into a SQL database. Google Maps are used for a layer. The geoJSON data format are used for ...
2
votes
1answer
76 views

Which conditions does the geoJSON file read from the server in?

I've added an alert to the function myReadFunction in order to detect function calls. As according to my observations, the function readMyFunction is called sometimes while I have been navigating on ...
2
votes
1answer
510 views

How to validate whether the BBOX strategy works successfully?

I want to send requests to our feature server that asks only data within the viewable map extent. So I've used BBOX strategy and HTTP Protocol as following code. mVectorLayer = new ...
1
vote
2answers
3k views

How to get GeoJSON features using OpenLayers?

Can anybody explain how to get geojson features .Can somebody show way to get attributes from geojson text. OpenLayers.ProxyHost = "/gt/proxy.cgi?url="; var lon = 5; var lat = 44; var ...
0
votes
1answer
263 views

How to publish my map from geoserver [duplicate]

Possible Duplicate: How to develop a map with layers in Geoserver? I'm trying to create a simple map for my city. I have a shape file my city, but I can't create on the web. I tried to ...
1
vote
2answers
505 views

How to use GeoJSON from Geoserver?

Please help me on how can get my map from Geoserver. I want create my country web but I can nott see it in my browser but I can see in Geoserver. Please help me I am very new openlayers and Geoserver. ...
2
votes
1answer
113 views

how to see multiple features from GeoJSON

In Pablo's answer: Open a GeoJSON file with QGis He says he 'imported each type at a time'. How do you do that? I am working with a GeoJSON file that has a mixture of points and polygons, but points ...
9
votes
1answer
4k views

Open a GeoJSON file with QGis

If I have a GEOJson file, for example a file named test.js with inside the following: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": ...
3
votes
1answer
2k views

Parsing a GeoJSON file with jQuery

I'm trying to iterate through a GeoJSON file (below) and eventually populate an array with a few attributes within "properties". I keep coming up short working through various examples I can find. Do ...
3
votes
2answers
1k views

Getting json feature id on OpenLayers

I'm projecting some features using json format on OpenLayers. I need to get the id from the feature (not the OpenLayers' id but the one in the json file). The file looks something like this. ...
1
vote
2answers
496 views

OpenLayers GeoJSON: limit significant digits to 6 when using write()?

Is there a way that OpenLayers.Format.JSON write() method to serialize coordinates using 6 decimals only ? Example: instead of http://pastie.org/4200997 to have http://pastie.org/4200994
1
vote
1answer
489 views

Draw svg-circle on a coordinate with polymaps

I'm making a tracker system which uses polymaps to display a satellite image. The code is copied from the bing-example on the website of polymaps. I now want to periodically call an update function ...
3
votes
2answers
2k views

Convert GML to GeoJSON

I have downloaded a GML file from Statistics Canada and would like to convert it into GeoJSON to use parts of it in a D3 visualization on the web. However, I did not find a converter that would do ...
5
votes
1answer
680 views

Exporting Arcgis Online content as georss or geojson? [duplicate]

There are number of sites talking about how to add a georss feed to an ArcGIS Online map (see silverlight and flex examples from esri_webapi), but I haven't located anything about exporting a georss ...
1
vote
1answer
314 views

how to make openlayers example work in jsFiddle

Hy, I'm working on a jsFiddle with a openlayers example in it. http://dev.openlayers.org/releases/OpenLayers-2.11/examples/snapping.html At the moment it's not working because it's not getting a ...
5
votes
1answer
798 views

Working examples of Leaflet/Polymaps with GeoJSON tiles generated from Tilestache using Shapefiles?

I'm looking to create choropleths using GeoJSON tiles generated from ESRI Shapefiles by TileStache(or similar), in either Leaflet or Polymaps. So far reading and drawing GeoJSON from both Leaflet and ...
1
vote
1answer
515 views

Select independent objects using GEOJson on Openlayers

I'm working with OpenLayers and loading a couple of GEOJson files which works perfectly. Now I want to be able to select individual components of the GEOJson file. As for example if I have more than ...
3
votes
1answer
4k views

How do I get GeoJSON data from GeoServer into show up on my Leaflet map?

I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
4
votes
2answers
405 views

Where can I find GeoJSON resources files?

I'm looking for demographic information and various things, and most of the time data are available as CSV (my application use geoJSON format). Shall I encode the CSV to geoJSON or is there a ...
5
votes
2answers
334 views

How can I setup a simple web mapping system?

I'm new to mapping and GIS and I'd like to setup a mapping system to display informations on a map, I think the following could work but I'm not sure how good it is.. 1- I store my data (lat, lng ...
13
votes
2answers
6k views

ogr2ogr converting to shapefile - how to select feature types?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
3
votes
0answers
128 views

GeoJSON support in ArcObjects 10 .NET

i am currently trying to build a geoprocessing application using OpenLayers and ArcObjects, I have some features that user draws on openlayers and i need to send these features to arcobjects for ...
0
votes
1answer
1k views

Alternate colors of GeoJSON linestring segments in OpenLayers?

I am rendering a vector linestring via GeoJSON on top of an OpenLayers map. I'd like to alternate the styling between two slightly different shades of blue, such that the colors alternate from one ...
2
votes
2answers
484 views

how we create line between two cordinates on polymap?

I am working on d3 and polymaps, I plot map and create circle on the given latitude and longitude which retrieves from the JSON file but now I want to connect those circles with line. I tried to do it ...
2
votes
4answers
4k views

How to convert SHP into GPX or JSON?

I would like to convert the tree inventory shape files of London (Canada) into a GPX file and if possible into a JSON file. You can download the archive from their Open Data website. It contains the ...
4
votes
1answer
770 views

Why are GeoJSON coordinates different exported from QGIS vs. ogr2ogr?

I have a shapefile with a Google Mercator projection (900913) that I need converted to GeoJSON. I need to do this on a regular basis amongst other things so I wrote a shell script to do it using ...