[seek-dev] What to do about "nil"

Matt Jones jones at nceas.ucsb.edu
Tue Nov 9 11:08:34 PST 2004


Hi Rod,

You're right that the data needs to be preserved even when the lat/lon 
values are nil -- some people may want to see the rest of the Darwin 
Core record for various workflows.  However, for the purposes of the 
niche model example, I think we want to filter out all records that lack 
lat/lon data.  So.... maybe the best solution is to fire some sort of 
null or missing value code on the lat/lon ports, and then provide a 
filter downstream in the workflow that only keeps records that have 
legit lat/lon values -- this is what GARP ultimately needs and what 
should be saved in the file.

Matt

Rod Spears wrote:
> Here is the schema for Latitude per the DarwinCore spec:
>    <xsd:element name="DecimalLatitude" 
> substitutionGroup="digir:searchableReturnableData" nillable="true">
>        <xsd:annotation>
>            <xsd:documentation>The latitude of the location from which 
> the cataloged item was collected, expressed in decimal 
> degrees.</xsd:documentation>
>        </xsd:annotation>
>        <xsd:simpleType>
>            <xsd:restriction base="xsd:decimal">
>                <xsd:minInclusive value="-90.0"/>
>                <xsd:maxInclusive value="90.0"/>
>            </xsd:restriction>
>        </xsd:simpleType>
>    </xsd:element>
> 
> Note that the value can be "nil" and it also has a restriction. When the 
> value reaches the DarwinCoreDataSource as a string it is either a valid 
> number within the range or an empty string (length zero).
> 
> Currently, I convert the empty string to "0.0" which is the wrong thing 
> to do. The question is what should I do? As Dan suggested I could pick 
> an arbitray large number and pass that back, but that assumes the 
> consumer will know what to do with that value. I could skip any and all 
> rows that have empty Lat or Long values, but that may be bad for 
> consumers that want to see that data but don't care if it is nil (empty) 
> or not.
> 
> Any thoughts?
> 
> Rod
> 
> _______________________________________________
> seek-dev mailing list
> seek-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/seek-dev

-- 
-------------------------------------------------------------------
Matt Jones                                     jones at nceas.ucsb.edu
http://www.nceas.ucsb.edu/    Fax: 425-920-2439    Ph: 907-789-0496
National Center for Ecological Analysis and Synthesis (NCEAS)
University of California Santa Barbara
Interested in ecological informatics? http://www.ecoinformatics.org
-------------------------------------------------------------------



More information about the Seek-dev mailing list