I've notice zero area boxes coming back from cts:element-attribute-pair-geospatial-boxes where N/S=90 when I specify 90 latitude as one of the boundaries.
Certainly, (-90,0,90) is equivalent to just (0) for latitude boundaries. Somehow, cts:element-attribute-pair-geospatial-boxes() seems to figure it out for -90 but not for 90. For example, consider: declare namespace s="http://weather.milowski.com/V/APRS/"; let $dtstart := xs:dateTime("2013-03-19T18:30:00Z"), $dtend := xs:dateTime("2013-03-19T19:00:00Z"), $boxes := cts:element-attribute-pair-geospatial-boxes( xs:QName("s:report"), QName("","latitude"), QName("","longitude"),(-90,0,90),(0,180), ("item-frequency","gridded","descending","empties"), cts:and-query( (cts:element-attribute-range-query(xs:QName("s:report"), QName("","received"),">=",$dtstart), cts:element-attribute-range-query(xs:QName("s:report"), QName("","received"),"<=",$dtend)) ) ) for $i in $boxes return element box { attribute count { cts:frequency($i) } , attribute s { cts:box-south($i) }, attribute w { cts:box-west($i) }, attribute n { cts:box-north($i) }, attribute e { cts:box-east($i) } } This returns the counts for the boxes based on a specific time period. The output is: <box count="26" s="90" w="0" n="90" e="180"/> <box count="0" s="90" w="-180" n="90" e="0"/> <box count="5083" s="0" w="0" n="90" e="180"/> <box count="26318" s="0" w="-180" n="90" e="0"/> <box count="594" s="-90" w="0" n="0" e="180"/> <box count="106" s="-90" w="-180" n="0" e="0"/> If I change to (0) for latitude bounds, I get: <box count="5109" s="0" w="0" n="90" e="180"/> <box count="26318" s="0" w="-180" n="90" e="0"/> <box count="594" s="-90" w="0" n="0" e="180"/> <box count="106" s="-90" w="-180" n="0" e="0"/> where 5109 = 5083 + 26. Why is -90 latitude treated differently from 90 latitude? -- --Alex Milowski "The excellence of grammar as a guide is proportional to the paucity of the inflexions, i.e. to the degree of analysis effected by the language considered." Bertrand Russell in a footnote of Principles of Mathematics
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
