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.

What are "Lazy Geometries"? How are they different from other types of geometries?

I'm an experienced Python/Django developer but am very new to the world of GIS, and understand that this is a newbie question. I've been unable to find the answer on google (if anyone can direct me towards a good tutorial site, I'd be grateful).

I encountered the term when reading up on GeoDjango (and it's use of the GEOS library).

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

Lazy geometries are not another kind of geometry. This only describes how Geodjango manages to load, instantiate and use geometry objects, and is pretty much like lazy loading in an O/R mapping framework.

If you access a whole bunch of geometry data (lets say from a table), geodjango loads them in text based "Well known text" (WKT) format. If you then pick one of them and want to calculate the area of a polygon for example, Geodjango instantiates a GEOS object for you and calculates the area on it.

So "lazy" refers to GeoDjangos behaviour to do costly things only when they are really needed.

Its also described in the GeoDjango Tutorial

share|improve this answer
    
Thanks kirk! en.wikipedia.org/wiki/Lazy_initialization is the concrete description how the lazy pattern is used here –  Jürgen Zornig Jun 26 '13 at 22:19
    
Perfect, thanks Jurgen. I appreciate the quick and detailed response –  Ashwin Balamohan Jun 26 '13 at 23:01
add comment

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.