moving LatLongBoundingBox?

Martin Schulze joey at infodrom.org
Sun Dec 19 18:35:34 CET 2004


Russell Nelson wrote:
> I notice that RasterLayer is using this definition of LatLongBoundingBox:
>     def LatLongBoundingBox(self):
>         bbox = self.BoundingBox()
>         if bbox is None:
>             return None
> 
>         if self.projection is not None:
>             bbox = self.projection.InverseBBox(bbox)
> 
>         return bbox
> 
> And Layer is using this definition:
>     def LatLongBoundingBox(self):
>         bbox = self.BoundingBox()
>         if bbox is not None and self.projection is not None:
>             bbox = self.projection.InverseBBox(bbox)
>         return bbox
> 
> 
> They both do the same thing, and both classes are derived from
> BaseLayer, so shouldn't it be defined in BaseLayer?  I'd pick the
> first of the two because it's more clear.  Also, I would use this
> Python ideom:

There are other layers as well (Extensions/wms) that dont' share
the above definitions, so not sure if it should be moved to the
upward class.

Regards,

	Joey

-- 
This is GNU/Linux Country.  On a quiet night, you can hear Windows reboot.




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)