Changeset 8392 for mauRepo/MolesManager
- Timestamp:
- 25/06/12 13:28:21 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py
r8387 r8392 45 45 from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 46 46 from sqlalchemy.orm.collections import InstrumentedList 47 from ea_model.iso_19115_2006_metadata_corrigendum.extent_information.ex_geographicboundingbox import EX_GeographicBoundingBox 48 from libs.postgisutil import unifyGeometries, create_st_setSRID 47 49 48 50 … … 148 150 return coll 149 151 152 def getGeograpicExtentGeometry(self, ge): 153 ''' 154 Creates the appropriate postgis geometry from a EX_GeographicExtent 155 @param ge: an EX_GeographicExtent instance 156 @return: a postgix text geometry 157 ''' 158 if isinstance(ge, EX_GeographicBoundingBox): 159 return create_st_setSRID(ge.westBoundLongitude, ge.southBoundLatitude, \ 160 ge.eastBoundLongitude, ge.northBoundLatitude) 161 return None 162 163 164 165 def getUnifyObservationCollectionGE(self, collection): 166 """ 167 Returns the union of the collections.member'a GeographicExtension(s) 168 @param collection: an CEDA_ObservationColleciton instance 169 """ 170 bboxes = [] 171 for member in collection.member: 172 for ge in member.geographicExtent: 173 bboxes.append(self.getGeograpicExtentGeometry(ge)) 174 175 return unifyGeometries(bboxes, self) 176 150 177 def retrieveGUIDFromInstance(self, instance): 151 178 """ -
mauRepo/MolesManager/trunk/src/libs/migration/processor/dataEntity.py
r8391 r8392 68 68 self._dataEntityHasSameHash = hasMOSameHash(self._dataEntityMigration) 69 69 self.epbRepo = epbRepo 70 71 def _checkGeographicExtent(self, ceda_observationCollection): 72 union = self.moles3epb.getUnifyObservationCollectionGE(ceda_observationCollection) 70 73 71 74 def _processTitle(self, ceda_observationCollection): … … 206 209 207 210 except Exception as ex: 208 exs.append(ex) 211 exs.append(ex) 212 213 self._checkGeographicExtent(obsColl) 214 209 215 return exs
Note: See TracChangeset
for help on using the changeset viewer.