Changeset 1378

Show
Ignore:
Timestamp:
09/03/08 14:01:29 (3 months ago)
Author:
sgillies
Message:

Add location geometry using the new geometry field

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pleiades.workspace/trunk/pleiades/workspace/browser/kml.py

    r1377 r1378  
    3636                lid = locations.invokeFactory( 
    3737                        'Location', 
    38                         geometryType=where.type, 
    39                         spatialCoordinates='%f %f' % (where.coordinates[1], where.coordinates[0]) 
     38                        geometry='%s: %s' % (where.type, where.coordinates), 
    4039                        ) 
    4140                nid = names.invokeFactory( 
  • pleiades.workspace/trunk/pleiades/workspace/tests/kml-import.txt

    r1374 r1378  
    7272    >>> len(list(ws['locations'].queryCatalog())) 
    7373    11 
     74 
     75Verify location 
     76 
     77    >>> loc = ws['locations'].queryCatalog()[0].getObject() 
     78    >>> loc.getGeometry() 
     79    'Point: (21.9725, 32.896299999999997, 0.0)'