Merge lp:~zorba-coders/zorba/geo-module-alone into lp:zorba/geo-module

Proposed by Juan Zacarias
Status: Merged
Approved by: Juan Zacarias
Approved revision: 40
Merged at revision: 41
Proposed branch: lp:~zorba-coders/zorba/geo-module-alone
Merge into: lp:zorba/geo-module
Diff against target: 1073 lines (+1/-841)
37 files modified
CMakeLists.txt (+0/-1)
src/CMakeLists.txt (+0/-2)
src/com/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/www/CMakeLists.txt (+0/-14)
src/com/zorba-xquery/www/modules/CMakeLists.txt (+0/-16)
src/com/zorba-xquery/www/modules/geoproj-param.xsd (+0/-48)
src/com/zorba-xquery/www/modules/geoproj.xq (+0/-516)
src/org/expath/ns/CMakeLists.txt (+1/-0)
test/ExpQueryResults/geo/dms1.xml.res (+0/-2)
test/ExpQueryResults/geo/dms2.xml.res (+0/-2)
test/ExpQueryResults/geo/geoproj1.xml.res (+0/-5)
test/ExpQueryResults/geo/geoproj10.xml.res (+0/-9)
test/ExpQueryResults/geo/geoproj11.xml.res (+0/-5)
test/ExpQueryResults/geo/geoproj12.xml.res (+0/-9)
test/ExpQueryResults/geo/geoproj2.xml.res (+0/-5)
test/ExpQueryResults/geo/geoproj3.xml.res (+0/-2)
test/ExpQueryResults/geo/geoproj4.xml.res (+0/-5)
test/ExpQueryResults/geo/geoproj5.xml.res (+0/-5)
test/ExpQueryResults/geo/geoproj6.xml.res (+0/-9)
test/ExpQueryResults/geo/geoproj7.xml.res (+0/-9)
test/ExpQueryResults/geo/geoproj8.xml.res (+0/-9)
test/ExpQueryResults/geo/geoproj9.xml.res (+0/-5)
test/Queries/geo/dms1.xq (+0/-13)
test/Queries/geo/dms2.xq (+0/-9)
test/Queries/geo/geoproj1.xq (+0/-8)
test/Queries/geo/geoproj10.xq (+0/-12)
test/Queries/geo/geoproj11.xq (+0/-8)
test/Queries/geo/geoproj12.xq (+0/-12)
test/Queries/geo/geoproj2.xq (+0/-8)
test/Queries/geo/geoproj3.xq (+0/-8)
test/Queries/geo/geoproj4.xq (+0/-5)
test/Queries/geo/geoproj5.xq (+0/-8)
test/Queries/geo/geoproj6.xq (+0/-12)
test/Queries/geo/geoproj7.xq (+0/-12)
test/Queries/geo/geoproj8.xq (+0/-12)
test/Queries/geo/geoproj9.xq (+0/-8)
To merge this branch: bzr merge lp:~zorba-coders/zorba/geo-module-alone
Reviewer Review Type Date Requested Status
Juan Zacarias Approve
Chris Hillery Approve
Review via email: mp+118626@code.launchpad.net

Commit message

Removed geoproj and created a separate branch for geoproj in lp:~zorba-coders/zorba/geoproj-module
Tests are omitted if geos is not found

To post a comment you must log in.
40. By Chris Hillery

Merge from trunk.

Revision history for this message
Chris Hillery (ceejatec) wrote :

I've merged this branch from the trunk. I also approve the new geoproj-module branch, and I made the lp:zorba/geoproj-module Launchpad series for it. Finally, I created a branch and merge proposal to add the geoproj module to Zorba's ExternalModules.conf: https://code.launchpad.net/~zorba-coders/zorba/add-geoproj-module/+merge/139840

review: Approve
Revision history for this message
Juan Zacarias (juan457) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job geo-module-alone-2012-12-14T16-00-35.264Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2011-08-10 14:05:17 +0000
3+++ CMakeLists.txt 2012-12-14 06:42:28 +0000
4@@ -32,7 +32,6 @@
5 FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
6 INCLUDE ("${Zorba_USE_FILE}")
7
8-ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
9 ADD_SUBDIRECTORY("src")
10
11 DONE_DECLARING_ZORBA_URIS()
12
13=== modified file 'src/CMakeLists.txt'
14--- src/CMakeLists.txt 2011-07-26 10:43:02 +0000
15+++ src/CMakeLists.txt 2012-12-14 06:42:28 +0000
16@@ -15,8 +15,6 @@
17 # all external module libraries are generated in the directory
18 # of the corresponding .xq file
19 MESSAGE(STATUS "Add org")
20-MESSAGE(STATUS "Add com")
21 ADD_SUBDIRECTORY(org)
22-ADD_SUBDIRECTORY(com)
23
24 MESSAGE(STATUS "End modules")
25
26=== removed directory 'src/com'
27=== removed file 'src/com/CMakeLists.txt'
28--- src/com/CMakeLists.txt 2011-10-06 08:18:23 +0000
29+++ src/com/CMakeLists.txt 1970-01-01 00:00:00 +0000
30@@ -1,14 +0,0 @@
31-# Copyright 2006-2008 The FLWOR Foundation.
32-#
33-# Licensed under the Apache License, Version 2.0 (the "License");
34-# you may not use this file except in compliance with the License.
35-# You may obtain a copy of the License at
36-#
37-# http://www.apache.org/licenses/LICENSE-2.0
38-#
39-# Unless required by applicable law or agreed to in writing, software
40-# distributed under the License is distributed on an "AS IS" BASIS,
41-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42-# See the License for the specific language governing permissions and
43-# limitations under the License.
44-ADD_SUBDIRECTORY(zorba-xquery)
45
46=== removed directory 'src/com/zorba-xquery'
47=== removed file 'src/com/zorba-xquery/CMakeLists.txt'
48--- src/com/zorba-xquery/CMakeLists.txt 2011-10-06 08:18:23 +0000
49+++ src/com/zorba-xquery/CMakeLists.txt 1970-01-01 00:00:00 +0000
50@@ -1,14 +0,0 @@
51-# Copyright 2006-2008 The FLWOR Foundation.
52-#
53-# Licensed under the Apache License, Version 2.0 (the "License");
54-# you may not use this file except in compliance with the License.
55-# You may obtain a copy of the License at
56-#
57-# http://www.apache.org/licenses/LICENSE-2.0
58-#
59-# Unless required by applicable law or agreed to in writing, software
60-# distributed under the License is distributed on an "AS IS" BASIS,
61-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62-# See the License for the specific language governing permissions and
63-# limitations under the License.
64-ADD_SUBDIRECTORY(www)
65
66=== removed directory 'src/com/zorba-xquery/www'
67=== removed file 'src/com/zorba-xquery/www/CMakeLists.txt'
68--- src/com/zorba-xquery/www/CMakeLists.txt 2011-10-06 08:18:23 +0000
69+++ src/com/zorba-xquery/www/CMakeLists.txt 1970-01-01 00:00:00 +0000
70@@ -1,14 +0,0 @@
71-# Copyright 2006-2008 The FLWOR Foundation.
72-#
73-# Licensed under the Apache License, Version 2.0 (the "License");
74-# you may not use this file except in compliance with the License.
75-# You may obtain a copy of the License at
76-#
77-# http://www.apache.org/licenses/LICENSE-2.0
78-#
79-# Unless required by applicable law or agreed to in writing, software
80-# distributed under the License is distributed on an "AS IS" BASIS,
81-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82-# See the License for the specific language governing permissions and
83-# limitations under the License.
84-ADD_SUBDIRECTORY(modules)
85
86=== removed directory 'src/com/zorba-xquery/www/modules'
87=== removed file 'src/com/zorba-xquery/www/modules/CMakeLists.txt'
88--- src/com/zorba-xquery/www/modules/CMakeLists.txt 2011-07-27 00:24:29 +0000
89+++ src/com/zorba-xquery/www/modules/CMakeLists.txt 1970-01-01 00:00:00 +0000
90@@ -1,16 +0,0 @@
91-# Copyright 2006-2008 The FLWOR Foundation.
92-#
93-# Licensed under the Apache License, Version 2.0 (the "License");
94-# you may not use this file except in compliance with the License.
95-# You may obtain a copy of the License at
96-#
97-# http://www.apache.org/licenses/LICENSE-2.0
98-#
99-# Unless required by applicable law or agreed to in writing, software
100-# distributed under the License is distributed on an "AS IS" BASIS,
101-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102-# See the License for the specific language governing permissions and
103-# limitations under the License.
104-DECLARE_ZORBA_SCHEMA (FILE geoproj-param.xsd
105- URI "http://www.zorba-xquery.com/modules/geoproj-param")
106-DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/geoproj" VERSION 1.0 FILE "geoproj.xq")
107
108=== removed file 'src/com/zorba-xquery/www/modules/geoproj-param.xsd'
109--- src/com/zorba-xquery/www/modules/geoproj-param.xsd 2011-08-05 02:22:02 +0000
110+++ src/com/zorba-xquery/www/modules/geoproj-param.xsd 1970-01-01 00:00:00 +0000
111@@ -1,48 +0,0 @@
112-<?xml version="1.0" encoding="utf-8"?>
113-<schema
114- targetNamespace="http://www.zorba-xquery.com/modules/geoproj-param"
115- xmlns:geoproj="http://www.zorba-xquery.com/modules/geoproj-param"
116- xmlns="http://www.w3.org/2001/XMLSchema"
117- version="1.0.0">
118-<!--
119-:: Copyright 2006-2008 The FLWOR Foundation.
120-::
121-:: Licensed under the Apache License, Version 2.0 (the "License");
122-:: you may not use this file except in compliance with the License.
123-:: You may obtain a copy of the License at
124-::
125-:: http://www.apache.org/licenses/LICENSE-2.0
126-::
127-:: Unless required by applicable law or agreed to in writing, software
128-:: distributed under the License is distributed on an "AS IS" BASIS,
129-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130-:: See the License for the specific language governing permissions and
131-:: limitations under the License.
132-::
133--->
134-
135-
136- <element name="lat" type="double"/>
137- <element name="long" type="double"/>
138- <element name="x" type="double"/>
139- <element name="y" type="double"/>
140-
141- <complexType name="latlongType">
142- <sequence>
143- <element ref="geoproj:lat"/>
144- <element ref="geoproj:long"/>
145- </sequence>
146- </complexType>
147-
148- <element name="latlong" type="geoproj:latlongType"/>
149-
150- <complexType name="coordType">
151- <sequence>
152- <element ref="geoproj:x"/>
153- <element ref="geoproj:y"/>
154- </sequence>
155- </complexType>
156-
157- <element name="coord" type="geoproj:coordType"/>
158-
159-</schema>
160\ No newline at end of file
161
162=== removed file 'src/com/zorba-xquery/www/modules/geoproj.xq'
163--- src/com/zorba-xquery/www/modules/geoproj.xq 2011-08-13 00:08:28 +0000
164+++ src/com/zorba-xquery/www/modules/geoproj.xq 1970-01-01 00:00:00 +0000
165@@ -1,516 +0,0 @@
166-xquery version "3.0";
167-
168-(:
169- : Copyright 2006-2009 The FLWOR Foundation.
170- :
171- : Licensed under the Apache License, Version 2.0 (the "License");
172- : you may not use this file except in compliance with the License.
173- : You may obtain a copy of the License at
174- :
175- : http://www.apache.org/licenses/LICENSE-2.0
176- :
177- : Unless required by applicable law or agreed to in writing, software
178- : distributed under the License is distributed on an "AS IS" BASIS,
179- : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
180- : See the License for the specific language governing permissions and
181- : limitations under the License.
182-:)
183-
184-(:~
185- : Geographic projection module.<br/>
186- : Forward and inverse projection from WGS84 lat-long coordinates to Oblique Mercator x-y projection.<br/>
187- : Oblique Mercator projection is a sphere to cylinder projection.<br/>
188- : This projection results in a conformal output, meaning the shape of small areas is preserved,
189- : no matter the distance from the origin. But it is not equal area, meaning the area size increases heavily
190- : when getting closer to North or South. The area size increases with the same amount on x and y axes,
191- : so the relative shape remains almost the same. <br/>
192- : Mercator projection is the oldest projection, and it is still widely used because it produces a rectangular map.
193- : This projection is used in Google Maps because of its conformal output. <br/>
194- : For military or measurements purposes the UTM projection is used (or variants). This splits the Earth into small
195- : areas and computes the cartesian coordinates relative to each area.<br/>
196- : <br/>
197- : Here we use Oblique Mercator projection. Its advantage over the normal Mercator is that you can set the tangent point
198- : between the cylinder and the sphere to be anywhere on Earth. So you can set the center of the map to be close
199- : to the area you want projected and be able to measure accurately the distances between points and lines.
200- : The map deformation is minimal close to the center point and close to the "equator" line.<br/>
201- : The advantage over the UTM projection is that it can also produce a global rectangular map, like Mercator,
202- : which is great for viewing.<br/>
203- : The disadvantage over Mercator is that it needs more processing power.<br/>
204- : <br/>
205- : WGS84 is the ellipsoid aproximation of the Earth, with big radius of 6,378,137 m and small radius of 6,356,752.3 m.
206- : The geographic coordinates expressed for this ellipsoid are widely used today in maps and gps coordinates.
207- : It is the default standard for representing geographic coordinates.<br/>
208- : <br/>
209- : The purpose of this module is to provide convertion from polar to cartesian coordinates, so you can
210- : process the geographic data with the Simple Features API functions implemented in the geo module.
211- : That module works only with cartesian coordinates, but most maps have polar coordinates. <br/>
212- : <br/>
213- : The projection formulas are taken from lib_proj library and implemented in XQuery.
214- :
215- : @author Daniel Turcanu
216- : @project geo
217- :)
218-module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
219-
220-(:~
221- : W3C Math namespace URI.
222-:)
223-declare namespace math="http://www.w3.org/2005/xpath-functions/math";
224-
225-declare namespace err = "http://www.w3.org/2005/xqt-errors";
226-
227-(:~
228- : Import module for checking if geoproj parameters are validated.
229- :)
230-import module namespace schemaOptions = "http://www.zorba-xquery.com/modules/schema";
231-
232-
233-(:~
234- : Contains the definitions of the geoproj parameters.
235-:)
236-import schema namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
237-
238-declare namespace gml="http://www.opengis.net/gml";
239-
240-declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
241-declare option ver:module-version "1.0";
242-
243-(:~
244- : Convert angle from degrees to radians. <br/>
245- : The parameter is first reduced to value range of (-360, 360).
246- :
247- : @param $deg angle in degrees
248- : @return value in radians (-2PI, 2PI)
249- :)
250-declare function geoproj:deg-to-rad($deg as xs:double) as xs:double
251-{
252- ($deg mod 360) * 2 * math:pi() div 360
253-};
254-
255-(:~
256- : Convert angle from radians to degrees. <br/>
257- :
258- : @param $rad value in radians
259- : @return value in degrees (-360, 360)
260- :)
261-declare function geoproj:rad-to-deg($rad as xs:double) as xs:double
262-{
263- ($rad * 360 div 2 div math:pi()) mod 360
264-};
265-
266-
267-(:~
268- : Compute the isometric latitude of $phi latitude.
269- :
270- : @param $phi a latitude
271- : @return isometric latitude in radians
272- :)
273-declare %private function geoproj:proj-tsfn($phi as xs:double) as xs:double
274-{
275- let $e as xs:double := 0.0818192E0
276- return
277- math:tan(math:pi() div 4 - $phi div 2) div math:pow((1 - $e * math:sin($phi)) div (1 + $e * math:sin($phi)), $e div 2)
278-};
279-
280-declare %private function geoproj:wgs84-to-omerc-validated(
281- $lat_0 as xs:double,
282- $long_c as xs:double,
283- $k0 as xs:double,
284- $lat_long_degrees as element(geoproj-param:latlong, geoproj-param:latlongType)*) as element(geoproj-param:coord)*
285-{
286- let $e as xs:double := 0.0818192E0
287- let $e2 := $e*$e
288- let $phi0 := geoproj:deg-to-rad($lat_0)
289- let $lambda0 := geoproj:deg-to-rad($long_c)
290- let $sin_phi0 := math:sin($phi0)
291- let $sin2_phi0 := $sin_phi0 * $sin_phi0
292- let $cos_phi0 := math:cos($phi0)
293- let $aphi0 := abs($phi0)
294- let $B := if ($aphi0 gt 1e-10) then math:sqrt(1 + $e2 div (1 - $e2) * math:pow($cos_phi0, 4)) else math:sqrt(1 - $e2)
295- let $A := if ($aphi0 gt 1e-10) then $B * $k0 * math:sqrt(1 - $e2) div (1 - $e2*$sin2_phi0) else $k0
296- let $t0 := geoproj:proj-tsfn($phi0)
297- let $D := if ($aphi0 gt 1e-10) then $B * math:sqrt(1 - $e2) div ($cos_phi0 * math:sqrt(1 - $e2*$sin2_phi0)) else 1
298- let $D := if ($D*$D < 1) then 1 else $D
299- let $F := if ($aphi0 gt 1e-10) then if ($phi0 < 0) then $D - math:sqrt($D*$D - 1) else $D + math:sqrt($D*$D - 1) else 1
300- let $E := if ($aphi0 gt 1e-10) then math:pow($t0, $B) * $F else 1
301-
302- let $G := ($F - 1 div $F) div 2
303- let $uc := abs($A div $B * math:atan2(math:sqrt($D*$D - 1), 1))
304- let $uc := if ($phi0 < 0) then -$uc else $uc
305-
306- for $latlong in $lat_long_degrees
307- let $phi := geoproj:deg-to-rad($latlong/*:lat)
308- let $lambda := geoproj:deg-to-rad($latlong/*:long)
309- let $V := math:sin($B * ($lambda - $lambda0))
310- return
311- if (abs($phi) lt (math:pi() div 2 - 1.e-10)) then
312- let $Q := $E div math:pow(geoproj:proj-tsfn($phi) , $B)
313- let $S := ($Q - 1 div $Q) div 2
314- let $T := ($Q + 1 div $Q) div 2
315- let $U := -$V div $T
316- let $v := if (abs($U) ne 1) then $A div (2 * $B) * math:log((1 - $U) div (1 + $U)) else 1 div 0
317- let $M := math:cos($B * ($lambda - $lambda0))
318- let $u := if ($M gt 1e-7) then $A div $B * math:atan2($S, $M) else $A*$B*($lambda - $lambda0)
319- let $u := $u - $uc
320- let $x := $v
321- let $x := $x * 6378137
322- let $y := $u
323- let $y := $y * 6378137
324- return <geoproj-param:coord><geoproj-param:x>{$x}</geoproj-param:x> <geoproj-param:y>{$y}</geoproj-param:y></geoproj-param:coord>
325- else
326- let $v := $A div $B * -4.2897288031186085136750723197195
327- let $u := $phi * $A div $B
328- let $u := $u - $uc
329- let $x := $v
330- let $x := $x * 6378137
331- let $y := $u
332- let $y := $y * 6378137
333- return <geoproj-param:coord><geoproj-param:x>{$x}</geoproj-param:x> <geoproj-param:y>{$y}</geoproj-param:y></geoproj-param:coord>
334-};
335-
336-(:~
337- : Forward projection from geographic coordinates lat-long on WGS84 ellipsoid to Oblique Mercator cylinder.<br/>
338- : The Oblique Mercator projection is like the standard Mercator projection, but you can choose the point of origin.<br/>
339- : Specify the coordinates of the center point somewhere near the points being projected,
340- : so the projection deformation is small.<br/>
341- : The azimuth in the center point, alpha, is hardcoded to zero, so the true north is preserved.
342- : This is a simplification of the standard Oblique Mercator projection. <br/>
343- : Gamma, the azimuth of the rectified bearing of center line is also zero, calculated from alpha.<br/>
344- : <br/>
345- : The radius of the Earth in WGS84 is 6378137 m.<br/>
346- : Reverse flatening 298.257223563.<br/>
347- : Eccentricity e 0.0818192.<br/>
348- :<br/>
349- : @param $lat_0 is the latitude for center point, in degrees (-90, 90)
350- : @param $long_c is the longitude for center point, in degrees (-180, 180)
351- : @param $k0 is the scale in the center point. The scale will increase when going far to north and south.
352- : Use value 1 to get the true distances between points, in meters.
353- : At equator, the distance for 1 degree is aproximately 110 km.
354- : @param $lat_long_degrees a sequence of nodes of type <br/>
355- : &lt;latlong&gt;&lt;lat&gt;<i>latitude degree</i>&lt;/lat&gt;&lt;long&gt;<i>longitude degree</i>&lt;/long&gt;&lt;/latlong&gt;<br/>
356- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param". Each node in the sequence is validated
357- : against the according schema.
358- :
359- : @error err:XQDY0027 if any of the nodes passed in the $lat-long-degress parameter is
360- : not valid according to the schema.
361- :
362- : @return a sequence of x-y coordinates in format <br/>
363- : &lt;coord&gt;&lt;x&gt;<i>x</i>&lt;/x&gt;&lt;y&gt;<i>y</i>&lt;/y&gt;&lt;/coord&gt; <br/>
364- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param" <br/>
365- : Note that the x coordinate corresponds to the longitude, and y coordinate to the latitude.<br/>
366- : The coordinates are expressed in meters.<br/>
367- : The coordinates are relative to the center point.
368- @example test/Queries/geo/geoproj1.xq
369- @example test/Queries/geo/geoproj5.xq
370- @example test/Queries/geo/geoproj6.xq
371- @example test/Queries/geo/geoproj8.xq
372- @example test/Queries/geo/geoproj9.xq
373- @example test/Queries/geo/geoproj10.xq
374- @example test/Queries/geo/geoproj12.xq
375- :)
376-declare function geoproj:wgs84-to-omerc( $lat-0 as xs:double,
377- $long-c as xs:double,
378- $k0 as xs:double,
379- $lat-long-degrees as element(geoproj-param:latlong)*) as element(geoproj-param:coord)*
380-{
381- let $validated-lat-long :=
382- (for $lat-long-degree in $lat-long-degrees
383- return
384- if(empty($lat-long-degree)) then
385- $lat-long-degrees
386- else
387- validate{$lat-long-degree} )
388- return
389- geoproj:wgs84-to-omerc-validated($lat-0, $long-c, $k0, $validated-lat-long)
390-};
391-
392-
393-(:~
394- : Forward projection from geographic coordinates lat-long on WGS84 ellipsoid to Oblique Mercator cylinder.<br/>
395- : This is an intermediate function for wgs84-to-omerc.<br/>
396- : The difference is that it returns the x-y coordinates in gml:pos format,
397- : gml being the prefix for the GML namespace "http://www.opengis.net/gml".<br/>
398- :<br/>
399- : @param $lat_0 is the latitude for center point, in degrees (-90, 90)
400- : @param $long_c is the longitude for center point, in degrees (-180, 180)
401- : @param $k0 is the scale in the center point.
402- : @param $lat_long_degrees a sequence of nodes of type <br/>
403- : &lt;latlong&gt;&lt;lat&gt;<i>latitude degree</i>&lt;/lat&gt;&lt;long&gt;<i>longitude degree</i>&lt;/long&gt;&lt;/latlong&gt;<br/>
404- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param". Each node in this sequence is validated according
405- : to the according schema.
406- :
407- : @error err:XQDY0027 if any of the nodes passed in the $lat-long-degress parameter is
408- : not valid according to the schema.
409- :
410- : @return a sequence of x-y coordinates in format <br/>
411- : &lt;gml:pos&gt;<i>x</i> <i>y</i>&lt;/gml:pos&gt; <br/>
412- : in namespace "http://www.opengis.net/gml"
413- @example test/Queries/geo/geoproj3.xq
414- :)
415-declare function geoproj:wgs84-to-omerc-gmlpos( $lat-0 as xs:double,
416- $long-c as xs:double,
417- $k0 as xs:double,
418- $lat-long-degrees as element(geoproj-param:latlong)*) as element(gml:pos)*
419-{
420- let $validated-lat-long :=
421- (for $lat-long-degree in $lat-long-degrees
422- return
423- if(empty($lat-long-degree)) then
424- $lat-long-degrees
425- else
426- validate{$lat-long-degree} )
427- return
428- geoproj:wgs84-to-omerc-gmlpos-validated($lat-0, $long-c, $k0, $validated-lat-long)
429-};
430-
431-declare %private function geoproj:wgs84-to-omerc-gmlpos-validated( $lat_0 as xs:double,
432- $long_c as xs:double,
433- $k0 as xs:double,
434- $lat_long_degrees as element(geoproj-param:latlong, geoproj-param:latlongType)*) as element(gml:pos)*
435-{
436- for $coord in geoproj:wgs84-to-omerc($lat_0, $long_c, $k0, $lat_long_degrees)
437- return
438- <gml:pos>{string($coord/*:x)}{" "}{string($coord/*:y)}</gml:pos>
439-};
440-
441-(:~
442- : Function for iterative computing of the inverse isometric latitude.
443- :
444- : @param $i the maximum iterations
445- : @param $ts precomputed value
446- : @param $e the Earth eccentricity. For WGS84 is hardcoded to 0.0818192.
447- : @param $prev_phi previous computed inverse isometric latitude
448- : @return isometric latitude in radians
449- :)
450-declare %private function geoproj:proj-phi2-helper($i as xs:integer,
451- $ts as xs:double , $e as xs:double,
452- $prev_phi as xs:double) as xs:double
453-{
454- if($i eq 0) then
455- $prev_phi
456- else
457- let $phi := math:pi() div 2 - 2 * math:atan($ts * math:pow((1 - $e * math:sin($prev_phi[1])) div (1 + $e * math:sin($prev_phi[1])), $e div 2))
458- return
459- if (abs($prev_phi - $phi) le 1.0e-10) then
460- $phi
461- else
462- geoproj:proj-phi2-helper($i - 1, $ts, $e, $phi)
463-};
464-
465-(:~
466- : Function for computing the inverse isometric latitude.
467- :
468- : @param $ts precomputed value, based on an initial latitude.
469- : @param $e the Earth eccentricity. For WGS84 is hardcoded to 0.0818192.
470- : @return inverse isometric latitude in radians
471- :)
472-declare %private function geoproj:proj-phi2($ts as xs:double, $e as xs:double) as xs:double
473-{
474- let $phi := math:pi() div 2 - 2 * math:atan($ts)
475- return
476- geoproj:proj-phi2-helper(15, $ts, $e, ($phi))
477-};
478-
479-(:~
480- : Inverse projection from cartesian coordinates on Oblique Mercator cylinder
481- : to geographic coordinates lat-long on WGS84 ellipsoid.<br/>
482- : The parameters for center point and scale should be the same as for the initial forward projection,
483- : otherwise you will get wrong results.<br/>
484- : <br/>
485- :<br/>
486- : @param $lat_0 is the latitude for center point, in degrees (-90, 90)
487- : @param $long_c is the longitude for center point, in degrees (-180, 180)
488- : @param $k0 is the scale in the center point.
489- : @param $coords a sequence of nodes of type <br/>
490- : &lt;coord&gt;&lt;x&gt;<i>x</i>&lt;/x&gt;&lt;y&gt;<i>y</i>&lt;/y&gt;&lt;/coord&gt; <br/>
491- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param"<br/>
492- : The coordinates are expressed in meters.
493- :
494- : @error err:XQDY0027 if any of the coordinates passed in the $coords parameter is
495- : not valid according to the schema.
496- :
497- : @return a sequence of geographic coordinates in format <br/>
498- : &lt;latlong&gt;&lt;lat&gt;<i>latitude degree</i>&lt;/lat&gt;&lt;long&gt;<i>longitude degree</i>&lt;/long&gt;&lt;/latlong&gt;<br/>
499- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param"<br/>
500- : Note that the longitude corresponds to the x coordinate, and the latitude to the y coordinate.<br/>
501- @example test/Queries/geo/geoproj2.xq
502- @example test/Queries/geo/geoproj7.xq
503- @example test/Queries/geo/geoproj11.xq
504- :)
505-declare function geoproj:omerc-to-wgs84($lat-0 as xs:double,
506- $long-c as xs:double,
507- $k0 as xs:double,
508- $coords as element(geoproj-param:coord)*) as element(geoproj-param:latlong)*
509-{
510- let $validated-coords :=
511- (for $coord in $coords
512- return
513- if(empty($coords)) then
514- $coord
515- else
516- validate{$coord} )
517- return
518- geoproj:omerc-to-wgs84-validated($lat-0, $long-c, $k0, $validated-coords)
519-};
520-
521-declare %private function geoproj:omerc-to-wgs84-validated($lat_0 as xs:double,
522- $long_c as xs:double,
523- $k0 as xs:double,
524- $coords as element(geoproj-param:coord, geoproj-param:coordType)*) as element(geoproj-param:latlong)*
525-{
526- let $e as xs:double := 0.0818192E0
527- let $e2 := $e*$e
528- let $phi0 := geoproj:deg-to-rad($lat_0)
529- let $lambda0 := geoproj:deg-to-rad($long_c)
530- let $sin_phi0 := math:sin($phi0)
531- let $sin2_phi0 := $sin_phi0 * $sin_phi0
532- let $cos_phi0 := math:cos($phi0)
533- let $aphi0 := abs($phi0)
534- let $B := if ($aphi0 gt 1.e-10) then math:sqrt(1 + $e2 div (1 - $e2) * math:pow($cos_phi0, 4)) else math:sqrt(1 - $e2)
535- let $A := if ($aphi0 gt 1.e-10) then $B * $k0 * math:sqrt(1 - $e2) div (1 - $e2*$sin2_phi0) else $k0
536- let $t0 := geoproj:proj-tsfn($phi0)
537- let $D := if ($aphi0 gt 1.e-10) then $B * math:sqrt(1 - $e2) div ($cos_phi0 * math:sqrt(1 - $e2*$sin2_phi0)) else 1
538- let $D := if ($D*$D < 1) then 1 else $D
539- let $F := if ($aphi0 gt 1.e-10) then if ($phi0 < 0) then $D - math:sqrt($D*$D - 1) else $D + math:sqrt($D*$D - 1) else 1
540- let $E := if ($aphi0 gt 1.e-10) then math:pow($t0, $B) * $F else 1
541-
542- let $G := ($F - 1 div $F) div 2
543- let $uc := abs($A div $B * math:atan2(math:sqrt($D*$D - 1), 1))
544- let $uc := if ($phi0 < 0) then -$uc else $uc
545-
546- for $coord in $coords
547- let $x := $coord/*:x div 6378137
548- let $y := $coord/*:y div 6378137
549- let $v := $x
550- let $u := $y + $uc
551- let $Qp := math:exp(-$B * $v div $A)
552- let $Sp := ($Qp - 1 div $Qp) div 2
553- let $Tp := ($Qp + 1 div $Qp) div 2
554- let $Vp := math:sin($B * $u div $A)
555- let $Up := $Vp div $Tp
556- return
557- if(abs(abs($Up) - 1) lt 1e-10) then
558- if ($Up gt 0) then
559- <geoproj-param:latlong><geoproj-param:lat>90</geoproj-param:lat> <geoproj-param:long>{$long_c}</geoproj-param:long></geoproj-param:latlong>
560- else
561- <geoproj-param:latlong><geoproj-param:lat>-90</geoproj-param:lat> <geoproj-param:long>{$long_c}</geoproj-param:long></geoproj-param:latlong>
562- else
563- let $phi := $E div math:sqrt((1 + $Up) div (1 - $Up))
564- let $phi := geoproj:proj-phi2(math:pow($phi, 1 div $B), $e)
565- let $lambda := - 1 div $B * math:atan2($Sp, math:cos($B * $u div $A))
566- return
567- <geoproj-param:latlong><geoproj-param:lat>{geoproj:rad-to-deg($phi)}</geoproj-param:lat> <geoproj-param:long>{geoproj:rad-to-deg($lambda+$lambda0)}</geoproj-param:long></geoproj-param:latlong>
568-};
569-
570-(:~
571- : Inverse projection from cartesian coordinates on Oblique Mercator cylinder
572- : to geographic coordinates lat-long on WGS84 ellipsoid.<br/>
573- : This is an intermediate function for omerc-to-wgs84.<br/>
574- : The difference is that it works with coordinates in gml:pos format,
575- : gml being the prefix for the GML namespace "http://www.opengis.net/gml".<br/>
576- :<br/>
577- : @param $lat_0 is the latitude for center point, in degrees (-90, 90)
578- : @param $long_c is the longitude for center point, in degrees (-180, 180)
579- : @param $k0 is the scale in the center point.
580- : @param $gmlposs a sequence of nodes of type <br/>
581- : &lt;gml:pos&gt;<i>x</i> <i>y</i>&lt;/gml:pos&gt; <br/>
582- : in namespace "http://www.opengis.net/gml"
583- : @return a sequence of geographic coordinates in format <br/>v
584- : &lt;latlong&gt;&lt;lat&gt;<i>latitude degree</i>&lt;/lat&gt;&lt;long&gt;<i>longitude degree</i>&lt;/long&gt;&lt;/latlong&gt;<br/>
585- : in namespace "http://www.zorba-xquery.com/modules/geoproj-param"
586- @example test/Queries/geo/geoproj4.xq
587- :)
588-declare function geoproj:omerc-gmlpos-to-wgs84($lat_0 as xs:double,
589- $long_c as xs:double,
590- $k0 as xs:double,
591- $gmlposs as element(gml:pos)*) as element(geoproj-param:latlong)*
592-{
593- geoproj:omerc-to-wgs84($lat_0, $long_c, $k0,
594- (for $gmlpos in $gmlposs
595- let $xystring := normalize-space(fn:string($gmlpos))
596- let $xy := tokenize($xystring, "[ \t\r\n]+")
597- let $x := $xy[1]
598- let $y := $xy[2]
599- return <geoproj-param:coord><geoproj-param:x>{$x}</geoproj-param:x><geoproj-param:y>{$y}</geoproj-param:y></geoproj-param:coord>))
600-};
601-
602-(:~
603- : Convertion from Degrees-Minutes-Seconds (DMS) to Degrees.<br/>
604- : The values for DMS can be like 11d12'13", meaning 11 degrees, 12 minutes and 13 seconds.<br/>
605- : One degree has 60 minutes, and one minute has 60 seconds.<br/>
606- : The separator for degrees can be one of the characters [dDoO].<br/>
607- : The separator for minutes can be one of the characters ['m].<br/>
608- : The separator for seconds can be " or nothing.<br/>
609- : The seconds can be a floating point number.<br/>
610- : <br/>
611- : The seconds can be missing, and if it is missing, the minutes can be missing too.<br/>
612- : The negative value can be expressed as -11d12'13" or 11d12'13"S or 11d12'13"W.
613- : Values for N (North) and E (East) are positive, and S (South) and W (West) are negative.
614- :<br/>
615- : @param $dms the degree-minutes-seconds string expressed in the format described above
616- : @return the value in degrees
617- @example test/Queries/geo/dms1.xq
618- :)
619-declare function geoproj:dms-to-deg($dms as xs:string) as xs:double
620-{
621- let $dms := normalize-space($dms)
622- let $dtok := tokenize($dms, "([DdOo])|([SNEW]$)")
623- let $d := $dtok[1] cast as xs:double
624- let $dsign := if($d < 0) then -1 else 1
625- let $d := abs($d)
626- return
627- if(count($dtok) eq 1) then
628- $dsign*$d
629- else
630- if(string-length($dtok[2]) eq 0) then
631- if(matches($dms, "[SW]$")) then
632- -$d
633- else
634- $dsign*$d
635- else
636- let $ms := substring($dms, string-length($dtok[1]) + 1 + 1)
637- let $mtok := tokenize($ms, "(['m])|([SNEW]$)")
638- let $m := abs($mtok[1] cast as xs:double)
639- let $d := $d + $m div 60
640- return
641- if(count($mtok) eq 1) then
642- $dsign*$d
643- else
644- if(string-length($mtok[2]) eq 0) then
645- if(matches($dms, "[SW]$")) then
646- -$d
647- else
648- $dsign*$d
649- else
650- let $ss := substring($ms, string-length($mtok[1]) + 1 + 1)
651- let $stok := tokenize($ss, '"|([SNEW]$)')
652- let $s := abs($stok[1] cast as xs:double)
653- let $d := $d + $s div 3600
654- return
655- if(matches($dms, "[SW]$")) then
656- -$d
657- else
658- $dsign*$d
659-};
660-
661-(:~
662- : Convertion from Degrees to Degrees-Minutes-Seconds (DMS).<br/>
663- : <br/>
664- : @param $deg the degree value
665- : @return the value in DMS format, <i>[-]degree</i><b>d</b><i>minutes</i><b>'</b><i>seconds</i>
666- @example test/Queries/geo/dms2.xq
667- :)
668-declare function geoproj:deg-to-dms($deg as xs:double) as xs:string
669-{
670- let $d := $deg cast as xs:integer
671- let $ms := abs($deg - $d) * 60
672- let $m := $ms cast as xs:integer
673- let $s := $ms - $m
674- let $s := $s * 60
675- let $m := if($s ge (60 - 1e-10)) then $m + 1 else $m
676- let $d := if($m ge (60 - 1e-10)) then $d + 1 else $d
677- let $m := if($m ge (60 - 1e-10)) then $m - 60 else $m
678- let $s := if($s ge (60 - 1e-10)) then 0 else $s
679- return
680- concat($d, "d", $m, "'", $s)
681-};
682
683=== modified file 'src/org/expath/ns/CMakeLists.txt'
684--- src/org/expath/ns/CMakeLists.txt 2011-07-26 09:33:59 +0000
685+++ src/org/expath/ns/CMakeLists.txt 2012-12-14 06:42:28 +0000
686@@ -30,6 +30,7 @@
687 INCLUDE_DIRECTORIES("geo.xq.src")
688 DECLARE_ZORBA_MODULE (URI "http://expath.org/ns/geo" VERSION 1.0 FILE "geo.xq" LINK_LIBRARIES "${GEOS_LIBRARIES}")
689
690+ ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
691 ELSE(GEOS_FOUND)
692 MESSAGE(STATUS "Geos Library Not Found. You need to install Geos library in order to compile the Geo Module.")
693 ENDIF(GEOS_FOUND)
694
695=== removed file 'test/ExpQueryResults/geo/dms1.xml.res'
696--- test/ExpQueryResults/geo/dms1.xml.res 2011-02-23 12:55:52 +0000
697+++ test/ExpQueryResults/geo/dms1.xml.res 1970-01-01 00:00:00 +0000
698@@ -1,2 +0,0 @@
699-<?xml version="1.0" encoding="UTF-8"?>
700-10.169444444444444 10 10 -10 -10 10.166666666666666 -10.168333333333333 -10.168333333333333 -10.169472222222222 10.169472222222222 -180.16947222222223
701\ No newline at end of file
702
703=== removed file 'test/ExpQueryResults/geo/dms2.xml.res'
704--- test/ExpQueryResults/geo/dms2.xml.res 2011-02-23 12:55:52 +0000
705+++ test/ExpQueryResults/geo/dms2.xml.res 1970-01-01 00:00:00 +0000
706@@ -1,2 +0,0 @@
707-<?xml version="1.0" encoding="UTF-8"?>
708-10d10'10 10d0'0 -10d0'0 10d10'0 -10d10'6 -10d10'10.1 -180d10'10.1
709\ No newline at end of file
710
711=== removed file 'test/ExpQueryResults/geo/geoproj1.xml.res'
712--- test/ExpQueryResults/geo/geoproj1.xml.res 2011-02-23 12:55:52 +0000
713+++ test/ExpQueryResults/geo/geoproj1.xml.res 1970-01-01 00:00:00 +0000
714@@ -1,5 +0,0 @@
715-<?xml version="1.0" encoding="UTF-8"?>
716-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
717- <geoproj-param:x>109292.73684961209</geoproj-param:x>
718- <geoproj-param:y>110793.18638310062</geoproj-param:y>
719-</geoproj-param:coord>
720\ No newline at end of file
721
722=== removed file 'test/ExpQueryResults/geo/geoproj10.xml.res'
723--- test/ExpQueryResults/geo/geoproj10.xml.res 2011-02-23 12:55:52 +0000
724+++ test/ExpQueryResults/geo/geoproj10.xml.res 1970-01-01 00:00:00 +0000
725@@ -1,9 +0,0 @@
726-<?xml version="1.0" encoding="UTF-8"?>
727-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
728- <geoproj-param:x>0</geoproj-param:x>
729- <geoproj-param:y>-110618.44951571905</geoproj-param:y>
730-</geoproj-param:coord>
731-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
732- <geoproj-param:x>0</geoproj-param:x>
733- <geoproj-param:y>2.3223354824420721E6</geoproj-param:y>
734-</geoproj-param:coord>
735\ No newline at end of file
736
737=== removed file 'test/ExpQueryResults/geo/geoproj11.xml.res'
738--- test/ExpQueryResults/geo/geoproj11.xml.res 2011-02-23 12:55:52 +0000
739+++ test/ExpQueryResults/geo/geoproj11.xml.res 1970-01-01 00:00:00 +0000
740@@ -1,5 +0,0 @@
741-<?xml version="1.0" encoding="UTF-8"?>
742-<geoproj-param:latlong xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
743- <geoproj-param:lat>-11.000065662385046</geoproj-param:lat>
744- <geoproj-param:long>0</geoproj-param:long>
745-</geoproj-param:latlong>
746\ No newline at end of file
747
748=== removed file 'test/ExpQueryResults/geo/geoproj12.xml.res'
749--- test/ExpQueryResults/geo/geoproj12.xml.res 2011-02-23 12:55:52 +0000
750+++ test/ExpQueryResults/geo/geoproj12.xml.res 1970-01-01 00:00:00 +0000
751@@ -1,9 +0,0 @@
752-<?xml version="1.0" encoding="UTF-8"?>
753-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
754- <geoproj-param:x>34417.375607682858</geoproj-param:x>
755- <geoproj-param:y>-6.7723638717972031E6</geoproj-param:y>
756-</geoproj-param:coord>
757-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
758- <geoproj-param:x>38106.644879161235</geoproj-param:x>
759- <geoproj-param:y>8.983207725162318E6</geoproj-param:y>
760-</geoproj-param:coord>
761\ No newline at end of file
762
763=== removed file 'test/ExpQueryResults/geo/geoproj2.xml.res'
764--- test/ExpQueryResults/geo/geoproj2.xml.res 2011-02-23 12:55:52 +0000
765+++ test/ExpQueryResults/geo/geoproj2.xml.res 1970-01-01 00:00:00 +0000
766@@ -1,5 +0,0 @@
767-<?xml version="1.0" encoding="UTF-8"?>
768-<geoproj-param:latlong xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
769- <geoproj-param:lat>11</geoproj-param:lat>
770- <geoproj-param:long>11</geoproj-param:long>
771-</geoproj-param:latlong>
772\ No newline at end of file
773
774=== removed file 'test/ExpQueryResults/geo/geoproj3.xml.res'
775--- test/ExpQueryResults/geo/geoproj3.xml.res 2011-02-23 12:55:52 +0000
776+++ test/ExpQueryResults/geo/geoproj3.xml.res 1970-01-01 00:00:00 +0000
777@@ -1,2 +0,0 @@
778-<?xml version="1.0" encoding="UTF-8"?>
779-<gml:pos xmlns:gml="http://www.opengis.net/gml">109.29273684961206 110.79318638310056</gml:pos>
780\ No newline at end of file
781
782=== removed file 'test/ExpQueryResults/geo/geoproj4.xml.res'
783--- test/ExpQueryResults/geo/geoproj4.xml.res 2011-02-23 12:55:52 +0000
784+++ test/ExpQueryResults/geo/geoproj4.xml.res 1970-01-01 00:00:00 +0000
785@@ -1,5 +0,0 @@
786-<?xml version="1.0" encoding="UTF-8"?>
787-<geoproj-param:latlong xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
788- <geoproj-param:lat>11</geoproj-param:lat>
789- <geoproj-param:long>11</geoproj-param:long>
790-</geoproj-param:latlong>
791\ No newline at end of file
792
793=== removed file 'test/ExpQueryResults/geo/geoproj5.xml.res'
794--- test/ExpQueryResults/geo/geoproj5.xml.res 2011-02-23 12:55:52 +0000
795+++ test/ExpQueryResults/geo/geoproj5.xml.res 1970-01-01 00:00:00 +0000
796@@ -1,5 +0,0 @@
797-<?xml version="1.0" encoding="UTF-8"?>
798-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
799- <geoproj-param:x>109292.73684961209</geoproj-param:x>
800- <geoproj-param:y>110793.18638310062</geoproj-param:y>
801-</geoproj-param:coord>
802\ No newline at end of file
803
804=== removed file 'test/ExpQueryResults/geo/geoproj6.xml.res'
805--- test/ExpQueryResults/geo/geoproj6.xml.res 2011-02-23 12:55:52 +0000
806+++ test/ExpQueryResults/geo/geoproj6.xml.res 1970-01-01 00:00:00 +0000
807@@ -1,9 +0,0 @@
808-<?xml version="1.0" encoding="UTF-8"?>
809-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
810- <geoproj-param:x>547086.3150955874</geoproj-param:x>
811- <geoproj-param:y>115174.5700163616</geoproj-param:y>
812-</geoproj-param:coord>
813-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
814- <geoproj-param:x>545150.00927157491</geoproj-param:x>
815- <geoproj-param:y>226184.45457291827</geoproj-param:y>
816-</geoproj-param:coord>
817\ No newline at end of file
818
819=== removed file 'test/ExpQueryResults/geo/geoproj7.xml.res'
820--- test/ExpQueryResults/geo/geoproj7.xml.res 2011-02-23 12:55:52 +0000
821+++ test/ExpQueryResults/geo/geoproj7.xml.res 1970-01-01 00:00:00 +0000
822@@ -1,9 +0,0 @@
823-<?xml version="1.0" encoding="UTF-8"?>
824-<geoproj-param:latlong xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
825- <geoproj-param:lat>11</geoproj-param:lat>
826- <geoproj-param:long>102</geoproj-param:long>
827- </geoproj-param:latlong>
828-<geoproj-param:latlong xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
829- <geoproj-param:lat>12</geoproj-param:lat>
830- <geoproj-param:long>102</geoproj-param:long>
831-</geoproj-param:latlong>
832\ No newline at end of file
833
834=== removed file 'test/ExpQueryResults/geo/geoproj8.xml.res'
835--- test/ExpQueryResults/geo/geoproj8.xml.res 2011-02-23 12:55:52 +0000
836+++ test/ExpQueryResults/geo/geoproj8.xml.res 1970-01-01 00:00:00 +0000
837@@ -1,9 +0,0 @@
838-<?xml version="1.0" encoding="UTF-8"?>
839-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
840- <geoproj-param:x>-218616.56181767309</geoproj-param:x>
841- <geoproj-param:y>111339.45363464409</geoproj-param:y>
842-</geoproj-param:coord>
843-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
844- <geoproj-param:x>-217845.99308707233</geoproj-param:x>
845- <geoproj-param:y>222020.3879810845</geoproj-param:y>
846-</geoproj-param:coord>
847\ No newline at end of file
848
849=== removed file 'test/ExpQueryResults/geo/geoproj9.xml.res'
850--- test/ExpQueryResults/geo/geoproj9.xml.res 2011-02-23 12:55:52 +0000
851+++ test/ExpQueryResults/geo/geoproj9.xml.res 1970-01-01 00:00:00 +0000
852@@ -1,5 +0,0 @@
853-<?xml version="1.0" encoding="UTF-8"?>
854-<geoproj-param:coord xmlns:geoproj-param="http://www.zorba-xquery.com/modules/geoproj-param">
855- <geoproj-param:x>0</geoproj-param:x>
856- <geoproj-param:y>-221150.04824675474</geoproj-param:y>
857-</geoproj-param:coord>
858\ No newline at end of file
859
860=== removed file 'test/Queries/geo/dms1.xq'
861--- test/Queries/geo/dms1.xq 2011-02-23 12:55:52 +0000
862+++ test/Queries/geo/dms1.xq 1970-01-01 00:00:00 +0000
863@@ -1,13 +0,0 @@
864-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
865-
866-(geoproj:dms-to-deg("10d10'10"),
867-geoproj:dms-to-deg("10d"),
868-geoproj:dms-to-deg("10"),
869-geoproj:dms-to-deg("10S"),
870-geoproj:dms-to-deg("10dS"),
871-geoproj:dms-to-deg("10o10N"),
872-geoproj:dms-to-deg("10d10.1S"),
873-geoproj:dms-to-deg("-10d10.1S"),
874-geoproj:dms-to-deg("10d10'10.1W"),
875-geoproj:dms-to-deg("10d10m10.1E"),
876-geoproj:dms-to-deg("180d10'10.1W"))
877\ No newline at end of file
878
879=== removed file 'test/Queries/geo/dms2.xq'
880--- test/Queries/geo/dms2.xq 2011-02-23 12:55:52 +0000
881+++ test/Queries/geo/dms2.xq 1970-01-01 00:00:00 +0000
882@@ -1,9 +0,0 @@
883-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
884-
885-(geoproj:deg-to-dms(10.169444444444444),
886- geoproj:deg-to-dms(10),
887- geoproj:deg-to-dms(-10),
888- geoproj:deg-to-dms(10.166666666666666),
889- geoproj:deg-to-dms(-10.168333333333333),
890- geoproj:deg-to-dms(-10.169472222222222),
891- geoproj:deg-to-dms(-180.16947222222223))
892\ No newline at end of file
893
894=== removed file 'test/Queries/geo/geoproj1.xq'
895--- test/Queries/geo/geoproj1.xq 2011-02-23 12:55:52 +0000
896+++ test/Queries/geo/geoproj1.xq 1970-01-01 00:00:00 +0000
897@@ -1,8 +0,0 @@
898-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
899-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
900-
901-geoproj:wgs84-to-omerc(10, 10, 1,
902- <geoproj-param:latlong>
903- <geoproj-param:lat>11</geoproj-param:lat>
904- <geoproj-param:long>11</geoproj-param:long>
905- </geoproj-param:latlong>)
906
907=== removed file 'test/Queries/geo/geoproj10.xq'
908--- test/Queries/geo/geoproj10.xq 2011-02-23 12:55:52 +0000
909+++ test/Queries/geo/geoproj10.xq 1970-01-01 00:00:00 +0000
910@@ -1,12 +0,0 @@
911-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
912-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
913-
914-geoproj:wgs84-to-omerc(-11, 0, 1,
915- (<geoproj-param:latlong>
916- <geoproj-param:lat>-12</geoproj-param:lat>
917- <geoproj-param:long>0</geoproj-param:long>
918- </geoproj-param:latlong>,
919- <geoproj-param:latlong>
920- <geoproj-param:lat>10</geoproj-param:lat>
921- <geoproj-param:long>0</geoproj-param:long>
922- </geoproj-param:latlong>))
923\ No newline at end of file
924
925=== removed file 'test/Queries/geo/geoproj11.xq'
926--- test/Queries/geo/geoproj11.xq 2011-02-23 12:55:52 +0000
927+++ test/Queries/geo/geoproj11.xq 1970-01-01 00:00:00 +0000
928@@ -1,8 +0,0 @@
929-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
930-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
931-
932-geoproj:omerc-to-wgs84(-10, 0, 1,
933- (<geoproj-param:coord>
934- <geoproj-param:x>0</geoproj-param:x>
935- <geoproj-param:y>-110618.44951571905</geoproj-param:y>
936- </geoproj-param:coord>))
937\ No newline at end of file
938
939=== removed file 'test/Queries/geo/geoproj12.xq'
940--- test/Queries/geo/geoproj12.xq 2011-02-23 12:55:52 +0000
941+++ test/Queries/geo/geoproj12.xq 1970-01-01 00:00:00 +0000
942@@ -1,12 +0,0 @@
943-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
944-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
945-
946-geoproj:wgs84-to-omerc(-11, 169, 1,
947- (<geoproj-param:latlong>
948- <geoproj-param:lat>-72</geoproj-param:lat>
949- <geoproj-param:long>170</geoproj-param:long>
950- </geoproj-param:latlong>,
951- <geoproj-param:latlong>
952- <geoproj-param:lat>70</geoproj-param:lat>
953- <geoproj-param:long>170</geoproj-param:long>
954- </geoproj-param:latlong>))
955\ No newline at end of file
956
957=== removed file 'test/Queries/geo/geoproj2.xq'
958--- test/Queries/geo/geoproj2.xq 2011-02-23 12:55:52 +0000
959+++ test/Queries/geo/geoproj2.xq 1970-01-01 00:00:00 +0000
960@@ -1,8 +0,0 @@
961-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
962-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
963-
964-geoproj:omerc-to-wgs84(10, 10, 1,
965- (<geoproj-param:coord>
966- <geoproj-param:x>109292.73684961209</geoproj-param:x>
967- <geoproj-param:y>110793.18638310062</geoproj-param:y>
968- </geoproj-param:coord>))
969\ No newline at end of file
970
971=== removed file 'test/Queries/geo/geoproj3.xq'
972--- test/Queries/geo/geoproj3.xq 2011-02-23 12:55:52 +0000
973+++ test/Queries/geo/geoproj3.xq 1970-01-01 00:00:00 +0000
974@@ -1,8 +0,0 @@
975-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
976-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
977-
978-geoproj:wgs84-to-omerc-gmlpos(10, 10, 1 div 1000,
979- <geoproj-param:latlong>
980- <geoproj-param:lat>11</geoproj-param:lat>
981- <geoproj-param:long>11</geoproj-param:long>
982- </geoproj-param:latlong>)
983
984=== removed file 'test/Queries/geo/geoproj4.xq'
985--- test/Queries/geo/geoproj4.xq 2011-02-23 12:55:52 +0000
986+++ test/Queries/geo/geoproj4.xq 1970-01-01 00:00:00 +0000
987@@ -1,5 +0,0 @@
988-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
989-declare namespace gml="http://www.opengis.net/gml";
990-
991-geoproj:omerc-gmlpos-to-wgs84(10, 10, 1 div 1000,
992- (<gml:pos xmlns:gml="http://www.opengis.net/gml">109.29273684961206 110.79318638310056</gml:pos>))
993\ No newline at end of file
994
995=== removed file 'test/Queries/geo/geoproj5.xq'
996--- test/Queries/geo/geoproj5.xq 2011-02-23 12:55:52 +0000
997+++ test/Queries/geo/geoproj5.xq 1970-01-01 00:00:00 +0000
998@@ -1,8 +0,0 @@
999-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
1000-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
1001-
1002-geoproj:wgs84-to-omerc(10, 100, 1,
1003- <geoproj-param:latlong>
1004- <geoproj-param:lat>11</geoproj-param:lat>
1005- <geoproj-param:long>101</geoproj-param:long>
1006- </geoproj-param:latlong>)
1007
1008=== removed file 'test/Queries/geo/geoproj6.xq'
1009--- test/Queries/geo/geoproj6.xq 2011-02-23 12:55:52 +0000
1010+++ test/Queries/geo/geoproj6.xq 1970-01-01 00:00:00 +0000
1011@@ -1,12 +0,0 @@
1012-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
1013-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
1014-
1015-geoproj:wgs84-to-omerc(10, 85, 1,
1016- (<geoproj-param:latlong>
1017- <geoproj-param:lat>11</geoproj-param:lat>
1018- <geoproj-param:long>90</geoproj-param:long>
1019- </geoproj-param:latlong>,
1020- <geoproj-param:latlong>
1021- <geoproj-param:lat>12</geoproj-param:lat>
1022- <geoproj-param:long>90</geoproj-param:long>
1023- </geoproj-param:latlong>))
1024
1025=== removed file 'test/Queries/geo/geoproj7.xq'
1026--- test/Queries/geo/geoproj7.xq 2011-02-23 12:55:52 +0000
1027+++ test/Queries/geo/geoproj7.xq 1970-01-01 00:00:00 +0000
1028@@ -1,12 +0,0 @@
1029-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
1030-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
1031-
1032-geoproj:omerc-to-wgs84(10, 100, 1,
1033- (<geoproj-param:coord>
1034- <geoproj-param:x>218616.56181767347</geoproj-param:x>
1035- <geoproj-param:y>111339.45363464409</geoproj-param:y>
1036- </geoproj-param:coord>,
1037- <geoproj-param:coord>
1038- <geoproj-param:x>217845.99308707257</geoproj-param:x>
1039- <geoproj-param:y>222020.3879810845</geoproj-param:y>
1040- </geoproj-param:coord>))
1041\ No newline at end of file
1042
1043=== removed file 'test/Queries/geo/geoproj8.xq'
1044--- test/Queries/geo/geoproj8.xq 2011-02-23 12:55:52 +0000
1045+++ test/Queries/geo/geoproj8.xq 1970-01-01 00:00:00 +0000
1046@@ -1,12 +0,0 @@
1047-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
1048-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
1049-
1050-geoproj:wgs84-to-omerc(10, -100, 1,
1051- (<geoproj-param:latlong>
1052- <geoproj-param:lat>11</geoproj-param:lat>
1053- <geoproj-param:long>-102</geoproj-param:long>
1054- </geoproj-param:latlong>,
1055- <geoproj-param:latlong>
1056- <geoproj-param:lat>12</geoproj-param:lat>
1057- <geoproj-param:long>-102</geoproj-param:long>
1058- </geoproj-param:latlong>))
1059\ No newline at end of file
1060
1061=== removed file 'test/Queries/geo/geoproj9.xq'
1062--- test/Queries/geo/geoproj9.xq 2011-02-23 12:55:52 +0000
1063+++ test/Queries/geo/geoproj9.xq 1970-01-01 00:00:00 +0000
1064@@ -1,8 +0,0 @@
1065-import module namespace geoproj = "http://www.zorba-xquery.com/modules/geoproj";
1066-declare namespace geoproj-param = "http://www.zorba-xquery.com/modules/geoproj-param";
1067-
1068-geoproj:wgs84-to-omerc(0, 0, 1,
1069- (<geoproj-param:latlong>
1070- <geoproj-param:lat>-2</geoproj-param:lat>
1071- <geoproj-param:long>0</geoproj-param:long>
1072- </geoproj-param:latlong>))
1073\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: