Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

First off, I realize that this is perhaps not the most stackexchange-esque question. I am however having trouble finding a good source of information for this. So if there is a better place for me to look for this information please redirect me there.

I am creating an application for which the persistence layer is PostGIS, and I am unsure what if any projection I should use for storing my data.

My spatial data system is working on the following general requirements:

  • The data that I am storing pertain to events, and I would like to be able to find events that are nearby another event. This is to say, given event 'foo' I would like to find events within a certain radius of 'foo.'
  • The data points are distributed at a national, and later at a potentially global level, but the distance comparisons would only occur at a relatively local level < 100k, so I only really care about fidelity of distance up until that point.
  • Accuracy is much less important than speed in my use case, and single digit percentage error is acceptable as long as the distance lookup is quick.

I have looked up the geography type which is not tied to a particular position, however the PostGIS documentation appears to take a rather condescending view of the geography type:

If you don't understand projections, and you don't want to learn about them, and you're prepared to accept the limitations in functionality available in GEOGRAPHY, then it might be easier for you to use GEOGRAPHY than GEOMETRY. Simply load your data up as longitude/latitude and go from there.

I am relatively comfortable with the mathematical notion of projection and the topology of manifolds, and I do care about performance, but I have little GIS specific knowledge and I have yet to find a place where there is a mapping between SRIDs and usecases. Is there a specific type of projection that I should be using, or a type that I should be looking for?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You should always have a projection (spatial reference) for spatial data. The database spatial search queries expect there to be a spatial reference and will probably either fail or take longer if one is not present.

There is another post which map projection should be used for global map with geography and human demographics where the OP faces a similar dilemma, read carefully the comment by whuber.

It would be best (probably) to store your data in geographic coordinates but do your searches in projected coordinates. If this is not possible then find or make a projection that covers the entire area of your data - not so easy with global data, but possible with national data.

Database searches are very quick, depending of course on the number of records, indexing (spatial and attribute) and your server hardware. A simple transformation will not affect your search times much but bad or missing spatial indexing will.

share|improve this answer
    
Thanks. Is there any place where I could potentially compare the errors between different comment projection types? Also, it was suggested elsewhere and implied by your comment that reprojection is lossy. Is this simply due to rounding and precision errors, or something else? –  user1467243 Jun 16 at 19:45
1  
any losses are likely to be in the order of fractions of milimetres or thousandths of an inch... due to rounding. GIS rarely goes sub metre, and even less often sub milimetre. The difference between projections is a question for geodesy and those boffins, totally worthy of a fresh post. I've never had a problem with projections and projected data but like I said I don't care about the 9th decimal place. From geographic coordinates it's easy (table lookup) to find the appropriate zone and if you use WGS84 there's a good UTM projection for EVERYWHERE except the poles - it gets messy there. –  Michael Miles-Stimson Jun 16 at 21:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.