System.Data.Spatial DbGeography.Distance units?

Several articles seem to agree on meters being used in 4326 as the unit of distance. WGS 84 is done in meters as well, which is probably why this uses meters. http://blogs.msdn.com/b/adonet/archive/2011/06/30/walkthrough-spatial-june-ctp.aspx http://www.jasonfollas.com/blog/archive/2011/07/20/entity-framework-spatial-first-look.aspx http://blog.simplecode.eu/post/DistancesWithDbGeographyAndDbGeometry

Spatial Data in PostgreSQL

First I’d like to clarify GiST indexes: GiST is actually a framework for creating indexes for new data types, not any particular indexing scheme itself. This framework happens to be used for the geometric types that come with Postgres, but it’s also used for a trigram-matching text similarity index on standard text columns, and of … Read more

NoSQL and spatial data

graphs databases like Neo4j are a very good fit, especially as you can add different indexing schemes dynamically as you go. Typical stuff you can do on your base data is of course 1D indexing (e.g. Timline or B-Trees) or funkier stuff like Hilbert Curves etc, see Nick’s blog. Also, for some live demonstration, look … Read more

Inverse Distance Weighted (IDW) Interpolation with Python

changed 20 Oct: this class Invdisttree combines inverse-distance weighting and scipy.spatial.KDTree. Forget the original brute-force answer; this is imho the method of choice for scattered-data interpolation. “”” invdisttree.py: inverse-distance-weighted interpolation using KDTree fast, solid, local “”” from __future__ import division import numpy as np from scipy.spatial import cKDTree as KDTree # http://docs.scipy.org/doc/scipy/reference/spatial.html __date__ = “2010-11-09 … Read more

What is ST in PostGIS?

From the manual: PostGIS has begun a transition from the existing naming convention to an SQL-MM-centric convention. As a result, most of the functions that you know and love have been renamed using the standard spatial type (ST) prefix. Previous functions are still available, though are not listed in this document where updated functions are … Read more

Simple way to subset SpatialPolygonsDataFrame (i.e. delete polygons) by attribute in R

looks like you’re overwriting the data, but not removing the polygons. If you want to cut down the dataset including both data and polygons, try e.g. world.map <- world.map[world.map$AREA > 30000,] plot(world.map) [[Edit 19 April, 2016]] That solution used to work, but @Bonnie reports otherwise for a newer R version (though perhaps the data has … Read more

What’s the best way to store co-ordinates (longitude/latitude, from Google Maps) in SQL Server?

Fair Warning! Before taking the advice to use the GEOGRAPHY type, make sure you are not planning on using Linq or Entity Framework to access the data because it’s not supported (as of November 2010) and you will be sad! Update Jul 2017 For those reading this answer now, it is obsolete as it refers … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)