Changeset 1110

Show
Ignore:
Timestamp:
06/17/08 16:34:11
Author:
mattrussell
Message:

Stage one of rename - change all references to 'geojson' in code to 'geojsonlib'
(Stage two is to rename the geojson top level dir using svn rename, and change the tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • geojsonlib/trunk/geojson/base.py

    r1063 r1110  
    11 
    2 from geojson.mapping import is_mapping, to_mapping 
    3 import geojson 
    4 import geojson.factory 
     2from geojsonlib.mapping import is_mapping, to_mapping 
     3import geojsonlib 
     4import geojsonlib.factory 
    55 
    66 
     
    5353            try: 
    5454                type_ = d.pop("type") 
    55                 geojson_factory = getattr(geojson.factory, type_) 
    56                 if not issubclass(geojson_factory, GeoJSON): 
     55                geojsonlib_factory = getattr(geojsonlib.factory, type_) 
     56                if not issubclass(geojsonlib_factory, GeoJSON): 
    5757                    raise TypeError("""\ 
    5858                    Not a valid GeoJSON type: 
    59                     %r (geojson_factory: %r, cls: %r) 
    60                     """ % (type_, geojson_factory, cls)) 
    61                 instance = geojson_factory(**d) 
     59                    %r (geojsonlib_factory: %r, cls: %r) 
     60                    """ % (type_, geojsonlib_factory, cls)) 
     61                instance = geojsonlib_factory(**d) 
    6262            except (AttributeError, KeyError), invalid: 
    6363                if not strict: 
  • geojsonlib/trunk/geojson/crs.py

    r1064 r1110  
    11 
    22 
    3 from geojson.base import GeoJSON 
     3from geojsonlib.base import GeoJSON 
    44 
    55 
  • geojsonlib/trunk/geojson/encoding.py

    r1063 r1110  
    88 
    99import simplejson 
    10 import geojson 
    11 import geojson.factory 
    12 from geojson.mapping import Mapping, to_mapping 
     10import geojsonlib 
     11import geojsonlib.factory 
     12from geojsonlib.mapping import Mapping, to_mapping 
    1313 
    1414 
     
    2323        type_str = d.pop("type", None) 
    2424        if type_str: 
    25             geojson_factory = getattr(geojson.factory, type_str, geojson.factory.GeoJSON) 
    26             d = geojson_factory(**d).__geo_interface__ 
     25            geojsonlib_factory = getattr(geojsonlib.factory, type_str, geojsonlib.factory.GeoJSON) 
     26            d = geojsonlib_factory(**d).__geo_interface__ 
    2727        return d 
    2828 
  • geojsonlib/trunk/geojson/factory.py

    r1063 r1110  
    1 from geojson.geometry import Point, LineString, Polygon 
    2 from geojson.geometry import MultiLineString, MultiPoint, MultiPolygon 
    3 from geojson.geometry import GeometryCollection 
    4 from geojson.feature import Feature, FeatureCollection 
    5 from geojson.base import GeoJSON 
    6 from geojson.crs import Named, Linked 
     1from geojsonlib.geometry import Point, LineString, Polygon 
     2from geojsonlib.geometry import MultiLineString, MultiPoint, MultiPolygon 
     3from geojsonlib.geometry import GeometryCollection 
     4from geojsonlib.feature import Feature, FeatureCollection 
     5from geojsonlib.base import GeoJSON 
     6from geojsonlib.crs import Named, Linked 
    77 
    88name = Named 
  • geojsonlib/trunk/geojson/feature.py

    r1054 r1110  
    1212""" 
    1313 
    14 from geojson.base import GeoJSON 
    15 import geojson.geometry  
     14from geojsonlib.base import GeoJSON 
     15import geojsonlib.geometry  
    1616 
    1717class Feature(GeoJSON): 
  • geojsonlib/trunk/geojson/geometry.py

    r1064 r1110  
    1 from geojson.base import GeoJSON 
    2 import geojson.crs  
     1from geojsonlib.base import GeoJSON 
     2import geojsonlib.crs  
    33 
    44 
     
    1010        super(Geometry, self).__init__(**extra) 
    1111        self.coordinates = coordinates or [] 
    12         self.crs = self.to_instance(crs, default=geojson.crs.Default, strict=True) 
     12        self.crs = self.to_instance(crs, default=geojsonlib.crs.Default, strict=True) 
    1313                     
    1414    @property 
  • geojsonlib/trunk/geojson/mapping.py

    r1040 r1110  
    2222class Mapping(object): 
    2323     
    24     """Define what a ``mapping`` is to geojson
     24    """Define what a ``mapping`` is to geojsonlib
    2525 
    2626    Until py3k, where we have abstract base classes, this will have to do.