Questions tagged [gis]

A Geographic Information System (GIS) captures, stores, analyzes, manages, and presents data that are linked to location(s). The GIS Stack Exchange should be considered for questions with this tag.

According to Wikipedia:

A geographic information system (GIS), geographical information system, or geospatial information system is any system that captures, stores, analyzes, manages, and presents data that are linked to location(s). In the simplest terms, GIS is the merging of cartography, statistical analysis, and database technology.

There is a Stack Exchange site devoted to Geographic Information Systems.

6555 questions
47
votes
4 answers

Leaflet.draw mapping: How to initiate the draw function without toolbar?

For anyone experienced with leaflet or leaflet.draw plugin: I want to initiate drawing a polygon without using the toolbar from leaflet.draw. I've managed to find the property that allows editing without using the toolbar (layer.editing.enable();)…
Sam
  • 900
  • 3
  • 10
  • 16
44
votes
3 answers

Point in Polygon with geoJSON in Python

I have a geoJSON database with lots of polygons (census tracts specifically) and I have lots of long,lat points. I am hoping that there would exist an efficient Python code to identify which census tract a given coordinate is in, however so far my…
Benjamin Horowitz
  • 604
  • 1
  • 8
  • 10
39
votes
7 answers

NoSQL and spatial data

Has any of you had any experience with using NoSQL (non-relational) databases to store spatial data? Are there any potential benefits (speed, space, ...) of using such databases to hold data for, say, a desktop application (compared to using…
Igor Brejc
  • 18,714
  • 13
  • 76
  • 95
39
votes
6 answers

How do you know what SRID to use for a shp file?

I am trying to put a SHP file into my PostGIS database, the the data is just a little off. I think this is because I am using the wrong SRID. The contents of the PRJ file are as…
priestc
  • 33,060
  • 24
  • 83
  • 117
38
votes
16 answers

Random geographic coordinates (on land, avoid ocean)

Any clever ideas on how to generate random coordinates (latitude / longitude) of places on Earth? Latitude / Longitude. Precision to 5 points and avoid bodies of water. double minLat = -90.00; double maxLat = 90.00; double…
sdolgy
  • 6,963
  • 3
  • 41
  • 61
38
votes
7 answers

Get altitude by longitude and latitude in Android

Is there a quick and efficient way to get altitude (elevation) by longitude and latitude on the Android platform?
Maksym Gontar
  • 22,765
  • 10
  • 78
  • 114
37
votes
6 answers

Simplified (or smooth) polygons that contain the original detailed polygon

I have a detailed 2D polygon (representing a geographic area) that is defined by a very large set of vertices. I'm looking for an algorithm that will simplify and smooth the polygon, (reducing the number of vertices) with the constraint that the…
mbrenig
  • 577
  • 1
  • 6
  • 11
37
votes
4 answers

sp::over() for point in polygon analysis

I have a shapefile named "ind_adm" and a SpatialPointsDataFrame called "pnts". The "pnts" contains points generated at random, and some of the points overlap with the polygon. See picture below. Now, I want do do a point in polygon analysis, i.e. I…
DotPi
  • 3,977
  • 6
  • 33
  • 53
37
votes
4 answers

Geographical boundaries of states/provinces -> Google Maps Polygon

I'm building a web application that is going to dynamically highlight certain U.S. states and Canadian provinces on a Google Map, based on buttons and click events. Plan A) Polygons My primary idea for this was to draw Polygons. For this I need…
motto
  • 1,305
  • 3
  • 16
  • 30
37
votes
3 answers

Facet with free scales but keep aspect ratio fixed

I am using ggplot to draw faceted maps and have been unable to work out how to allow "free" scales in each facet (so that small regions don't look too small) while keeping the x-y aspect ratio fixed. Here is a simplified…
seancarmody
  • 6,182
  • 2
  • 34
  • 31
35
votes
8 answers

Calculate distance between Zip Codes... AND users.

This is more of a challenge question than something I urgently need, so don't spend all day on it guys. I built a dating site (long gone) back in 2000 or so, and one of the challenges was calculating the distance between users so we could present…
bopapa_1979
  • 8,949
  • 10
  • 51
  • 76
34
votes
6 answers

Where can I get postal codes for all countries?

I once read about an open source database for postal codes with geolocation data but now I can't remember its name. Can someone help?
suhair
  • 10,895
  • 11
  • 52
  • 63
34
votes
3 answers

How do I convert a latitude/longitude pair into a PostGIS geography type?

I'm trying to load a bunch of latitude/longitude pairs into a PostGIS geography type so as to be able to query by location. In particular I have a table with float latitude and longitude columns and a geography(Point, 4326) column. I would like to…
DRMacIver
  • 2,259
  • 1
  • 17
  • 17
33
votes
3 answers

C# implementation of Google's 'Encoded Polyline Algorithm'

Does anyone have a concise and robust implementation of Google's Encoded Polyline Algorithm in C#? I essentially want the implementation of this signature: public string Encode(IEnumerable points);
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
32
votes
3 answers

Error: isTRUE(gpclibPermitStatus()) is not TRUE

This question may be a duplicate of an earlier unanswered one. I still have the problem. I am trying to use a zipcode shapefile and coming up with the following error: tract <- readOGR(dsn = ".", layer =…
garson
  • 1,505
  • 3
  • 22
  • 56