Changeset 2325 for TI02-CSML/trunk


Ignore:
Timestamp:
26/03/07 12:43:47 (12 years ago)
Author:
domlowe
Message:

fixed schemalocation, datasetid, CMSLfeaturecollection in scanner

Location:
TI02-CSML/trunk/csml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmllibs/csmlbuilder.py

    r2215 r2325  
    4848        #Create an Empty Dataset 
    4949        self.ds = csml.parser.Dataset() 
    50         #Set gml:id attribute of dataset to be equal to the directory name. (may want to rethink this later) 
    51         setattr(self.ds,'id',self.directory) 
     50        #Use random id for dataset id. 
     51        setattr(self.ds,'id',csml.csmllibs.csmlextra.getRandomID())         
    5252        #setattr(self.ds, 'arrayDescriptors', adlist) 
    5353        #setattr(self.ds, 'unitDefinitions', uds) 
     
    115115        self.featureCollection = thefeatures.featureCollection 
    116116        self.featureCollection =csml.csmllibs.csmlextra.addEnvelope(self.featureCollection, self.ffmap)         
     117        setattr(self.featureCollection, 'id', csml.csmllibs.csmlextra.getRandomID()) 
    117118        try: 
    118119            self.featureCollection =csml.csmllibs.csmlextra.addEnvelope(self.featureCollection, self.ffmap)         
  • TI02-CSML/trunk/csml/parser_extra.py

    r2224 r2325  
    7171         
    7272        #add namespace declarations at top of document 
    73         csmlstring=csmlstring.replace('<Dataset', '<Dataset xmlns="http://ndg.nerc.ac.uk/csml"  xmlns:gml="http://www.opengis.net/gml" xmlns:om="http://www.opengis.net/om" xmlns:swe="http://www.opengis.net/swe"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:moles="http://ndg.nerc.ac.uk/moles"  xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://ndg.nerc.ac.uk/csml/XMLSchemas/CSMLAppSchema.xsd"') 
     73        csmlstring=csmlstring.replace('<Dataset', '<Dataset xmlns="http://ndg.nerc.ac.uk/csml"  xmlns:gml="http://www.opengis.net/gml" xmlns:om="http://www.opengis.net/om" xmlns:swe="http://www.opengis.net/swe"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:moles="http://ndg.nerc.ac.uk/moles"  xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://ndg.nerc.ac.uk/csml CSMLAppSchema.xsd"') 
    7474         
    7575        #this is only used when creating a new csml document 
Note: See TracChangeset for help on using the changeset viewer.