Skip to content

Commit

Permalink
msautotest: remove truncation of last decimal figure to numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Aug 24, 2021
1 parent 89b306e commit 97c5500
Show file tree
Hide file tree
Showing 242 changed files with 4,421 additions and 4,454 deletions.
6 changes: 3 additions & 3 deletions msautotest/misc/expected/encodings.xml
Expand Up @@ -11,19 +11,19 @@ Content-Type: text/xml; charset=UTF-8
http://mapserver.gis.umn.edu/mapserver http://foo?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=encoded&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.95118,0.39958 -0.95118,0.39958</gml:coordinates>
<gml:coordinates>-0.951189,0.399582 -0.951189,0.399582</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:encoded>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.95118,0.39958 -0.95118,0.39958</gml:coordinates>
<gml:coordinates>-0.951189,0.399582 -0.951189,0.399582</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-0.95118,0.39958</gml:coordinates>
<gml:coordinates>-0.951189,0.399582</gml:coordinates>
</gml:Point>
</ms:msGeometry>
</ms:encoded>
Expand Down
48 changes: 24 additions & 24 deletions msautotest/misc/expected/runtime_sub_test_caps.xml
Expand Up @@ -39,10 +39,10 @@ Content-Type: text/xml; charset=UTF-8
<Abstract>runtime_sub</Abstract>
<CRS>EPSG:3857</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.12289</westBoundLongitude>
<eastBoundLongitude>7.08770</eastBoundLongitude>
<southBoundLatitude>39.44072</southBoundLatitude>
<northBoundLatitude>44.15203</northBoundLatitude>
<westBoundLongitude>1.122894</westBoundLongitude>
<eastBoundLongitude>7.087708</eastBoundLongitude>
<southBoundLatitude>39.440727</southBoundLatitude>
<northBoundLatitude>44.152034</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="125000" miny="4.785e+06" maxx="789000" maxy="5.489e+06" />
Expand Down Expand Up @@ -81,10 +81,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>layer5</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.10893</westBoundLongitude>
<eastBoundLongitude>7.19752</eastBoundLongitude>
<southBoundLatitude>39.27271</southBoundLatitude>
<northBoundLatitude>44.14150</northBoundLatitude>
<westBoundLongitude>1.108938</westBoundLongitude>
<eastBoundLongitude>7.197525</eastBoundLongitude>
<southBoundLatitude>39.272716</southBoundLatitude>
<northBoundLatitude>44.141505</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="123446" miny="4.76081e+06" maxx="801225" maxy="5.48737e+06" />
Expand All @@ -98,10 +98,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>layer5b</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.10893</westBoundLongitude>
<eastBoundLongitude>7.19752</eastBoundLongitude>
<southBoundLatitude>39.27271</southBoundLatitude>
<northBoundLatitude>44.14150</northBoundLatitude>
<westBoundLongitude>1.108938</westBoundLongitude>
<eastBoundLongitude>7.197525</eastBoundLongitude>
<southBoundLatitude>39.272716</southBoundLatitude>
<northBoundLatitude>44.141505</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="123446" miny="4.76081e+06" maxx="801225" maxy="5.48737e+06" />
Expand All @@ -115,10 +115,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>layer6</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.10893</westBoundLongitude>
<eastBoundLongitude>7.19752</eastBoundLongitude>
<southBoundLatitude>39.27271</southBoundLatitude>
<northBoundLatitude>44.14150</northBoundLatitude>
<westBoundLongitude>1.108938</westBoundLongitude>
<eastBoundLongitude>7.197525</eastBoundLongitude>
<southBoundLatitude>39.272716</southBoundLatitude>
<northBoundLatitude>44.141505</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="123446" miny="4.76081e+06" maxx="801225" maxy="5.48737e+06" />
Expand All @@ -132,10 +132,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>layer7</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.10893</westBoundLongitude>
<eastBoundLongitude>7.19752</eastBoundLongitude>
<southBoundLatitude>39.27271</southBoundLatitude>
<northBoundLatitude>44.14150</northBoundLatitude>
<westBoundLongitude>1.108938</westBoundLongitude>
<eastBoundLongitude>7.197525</eastBoundLongitude>
<southBoundLatitude>39.272716</southBoundLatitude>
<northBoundLatitude>44.141505</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="123446" miny="4.76081e+06" maxx="801225" maxy="5.48737e+06" />
Expand All @@ -149,10 +149,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>layer8</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>1.10893</westBoundLongitude>
<eastBoundLongitude>7.19752</eastBoundLongitude>
<southBoundLatitude>39.27271</southBoundLatitude>
<northBoundLatitude>44.14150</northBoundLatitude>
<westBoundLongitude>1.108938</westBoundLongitude>
<eastBoundLongitude>7.197525</eastBoundLongitude>
<southBoundLatitude>39.272716</southBoundLatitude>
<northBoundLatitude>44.141505</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:3857"
minx="123446" miny="4.76081e+06" maxx="801225" maxy="5.48737e+06" />
Expand Down
33 changes: 0 additions & 33 deletions msautotest/pymod/mstestlib.py
Expand Up @@ -400,38 +400,6 @@ def fixexponent_file( filename ):
return

###############################################################################
# Do windows number of decimal truncation.

def truncate_one_decimal( filename ):
import re

data = open(filename,'rb').read()

from sys import version_info
if version_info >= (3,0,0):
data = str(data, 'iso-8859-1')

numbers_found = re.compile('[0-9]+\.[0-9]{6,24}', re.M)

start = 0
new_data = ''
for number in numbers_found.finditer(data):
end = number.end() - 1
new_data = new_data + data[start:end]
start = number.end()

if new_data != '':
new_data = new_data + data[start:]


if new_data != '' and new_data != data:
if version_info >= (3,0,0):
open(filename,'wb').write(bytes(new_data, 'iso-8859-1'))
else:
open(filename,'wb').write(new_data)

return
###############################################################################
# Replace CR+LF by CR

def crlf( filename ):
Expand Down Expand Up @@ -649,7 +617,6 @@ def _run(map, out_file, command, extra_args):
deversion_file( 'result/'+out_file )
degdalversion_file( 'result/'+out_file )
fixexponent_file( 'result/'+out_file )
truncate_one_decimal( 'result/'+out_file )
detimestamp_file( 'result/'+out_file )
if extractserviceversion:
extract_service_version_file( 'result/'+out_file )
Expand Down
26 changes: 13 additions & 13 deletions msautotest/wxs/expected/ows_all_wms_capabilities.xml
Expand Up @@ -132,22 +132,22 @@ Content-Type: text/xml; charset=UTF-8
</KeywordList>
<CRS>EPSG:4326</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-1.00000</westBoundLongitude>
<eastBoundLongitude>-1.00000</eastBoundLongitude>
<southBoundLatitude>-1.00000</southBoundLatitude>
<northBoundLatitude>-1.00000</northBoundLatitude>
<westBoundLongitude>-1.000000</westBoundLongitude>
<eastBoundLongitude>-1.000000</eastBoundLongitude>
<southBoundLatitude>-1.000000</southBoundLatitude>
<northBoundLatitude>-1.000000</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:4326"
minx="-1.00000" miny="-1.00000" maxx="-1.00000" maxy="-1.00000" />
minx="-1.000000" miny="-1.000000" maxx="-1.000000" maxy="-1.000000" />
<Layer queryable="1" opaque="0" cascaded="0">
<Name>road</Name>
<Title>road</Title>
<CRS>EPSG:43204</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-66.63331</westBoundLongitude>
<eastBoundLongitude>-59.29211</eastBoundLongitude>
<southBoundLatitude>42.38205</southBoundLatitude>
<northBoundLatitude>48.29551</northBoundLatitude>
<westBoundLongitude>-66.633318</westBoundLongitude>
<eastBoundLongitude>-59.292114</eastBoundLongitude>
<southBoundLatitude>42.382054</southBoundLatitude>
<northBoundLatitude>48.295512</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:43204"
minx="2.25898e+06" miny="-70747.9" maxx="2.61535e+06" maxy="495481" />
Expand All @@ -169,10 +169,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>province</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>-66.72432</westBoundLongitude>
<eastBoundLongitude>-57.72168</eastBoundLongitude>
<southBoundLatitude>41.77050</southBoundLatitude>
<northBoundLatitude>48.47731</northBoundLatitude>
<westBoundLongitude>-66.724329</westBoundLongitude>
<eastBoundLongitude>-57.721680</eastBoundLongitude>
<southBoundLatitude>41.770508</southBoundLatitude>
<northBoundLatitude>48.477314</northBoundLatitude>
</EX_GeographicBoundingBox>
<MetadataURL type="TC211">
<Format>text/xml</Format>
Expand Down
26 changes: 13 additions & 13 deletions msautotest/wxs/expected/ows_all_wms_capabilities_post.xml
Expand Up @@ -132,22 +132,22 @@ Content-Type: text/xml; charset=UTF-8
</KeywordList>
<CRS>EPSG:4326</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-1.00000</westBoundLongitude>
<eastBoundLongitude>-1.00000</eastBoundLongitude>
<southBoundLatitude>-1.00000</southBoundLatitude>
<northBoundLatitude>-1.00000</northBoundLatitude>
<westBoundLongitude>-1.000000</westBoundLongitude>
<eastBoundLongitude>-1.000000</eastBoundLongitude>
<southBoundLatitude>-1.000000</southBoundLatitude>
<northBoundLatitude>-1.000000</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:4326"
minx="-1.00000" miny="-1.00000" maxx="-1.00000" maxy="-1.00000" />
minx="-1.000000" miny="-1.000000" maxx="-1.000000" maxy="-1.000000" />
<Layer queryable="1" opaque="0" cascaded="0">
<Name>road</Name>
<Title>road</Title>
<CRS>EPSG:43204</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-66.63331</westBoundLongitude>
<eastBoundLongitude>-59.29211</eastBoundLongitude>
<southBoundLatitude>42.38205</southBoundLatitude>
<northBoundLatitude>48.29551</northBoundLatitude>
<westBoundLongitude>-66.633318</westBoundLongitude>
<eastBoundLongitude>-59.292114</eastBoundLongitude>
<southBoundLatitude>42.382054</southBoundLatitude>
<northBoundLatitude>48.295512</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="EPSG:43204"
minx="2.25898e+06" miny="-70747.9" maxx="2.61535e+06" maxy="495481" />
Expand All @@ -169,10 +169,10 @@ Content-Type: text/xml; charset=UTF-8
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>province</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>-66.72432</westBoundLongitude>
<eastBoundLongitude>-57.72168</eastBoundLongitude>
<southBoundLatitude>41.77050</southBoundLatitude>
<northBoundLatitude>48.47731</northBoundLatitude>
<westBoundLongitude>-66.724329</westBoundLongitude>
<eastBoundLongitude>-57.721680</eastBoundLongitude>
<southBoundLatitude>41.770508</southBoundLatitude>
<northBoundLatitude>48.477314</northBoundLatitude>
</EX_GeographicBoundingBox>
<MetadataURL type="TC211">
<Format>text/xml</Format>
Expand Down
10 changes: 5 additions & 5 deletions msautotest/wxs/expected/ows_all_wms_getfeatureinfo.xml
Expand Up @@ -11,7 +11,7 @@ Content-Type: application/vnd.ogc.gml; charset=UTF-8
<road_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-64.61702,44.55887 -64.37038,45.03870</gml:coordinates>
<gml:coordinates>-64.617027,44.558875 -64.370387,45.038703</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<FNODE_>903</FNODE_>
Expand All @@ -28,7 +28,7 @@ Content-Type: application/vnd.ogc.gml; charset=UTF-8
<road_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-65.12722,44.39911 -64.55216,44.93469</gml:coordinates>
<gml:coordinates>-65.127228,44.399110 -64.552161,44.934696</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<FNODE_>950</FNODE_>
Expand All @@ -45,7 +45,7 @@ Content-Type: application/vnd.ogc.gml; charset=UTF-8
<road_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-64.57786,44.69501 -63.70018,45.04540</gml:coordinates>
<gml:coordinates>-64.577864,44.695012 -63.700184,45.045403</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<FNODE_>903</FNODE_>
Expand All @@ -62,7 +62,7 @@ Content-Type: application/vnd.ogc.gml; charset=UTF-8
<road_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-63.71454,44.64282 -63.70018,44.69501</gml:coordinates>
<gml:coordinates>-63.714548,44.642829 -63.700184,44.695012</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<FNODE_>908</FNODE_>
Expand All @@ -79,7 +79,7 @@ Content-Type: application/vnd.ogc.gml; charset=UTF-8
<road_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-64.37038,44.55887 -63.71454,44.67929</gml:coordinates>
<gml:coordinates>-64.370387,44.558875 -63.714548,44.679291</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<FNODE_>914</FNODE_>
Expand Down
12 changes: 6 additions & 6 deletions msautotest/wxs/expected/ows_metadata_layer_raster.xml
Expand Up @@ -125,16 +125,16 @@ Content-type: text/xml
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:westBoundLongitude>
<gco:Decimal>-117.54590</gco:Decimal>
<gco:Decimal>-117.545904</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>-117.38727</gco:Decimal>
<gco:Decimal>-117.387277</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>44.66561</gco:Decimal>
<gco:Decimal>44.665615</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>44.76708</gco:Decimal>
<gco:Decimal>44.767083</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
Expand Down Expand Up @@ -215,7 +215,7 @@ Content-type: text/xml
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=toronto&amp;format=image/png&amp;crs=EPSG:32611&amp;bbox=4945950.00000,456800.00000,4957150.00000,469300.00000</gmd:URL>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=toronto&amp;format=image/png&amp;crs=EPSG:32611&amp;bbox=4945950.000000,456800.000000,4957150.000000,469300.000000</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:DOWNLOAD-1.0-http-get-map</gco:CharacterString>
Expand All @@ -231,7 +231,7 @@ Content-type: text/xml
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=toronto&amp;format=image/jpeg&amp;crs=EPSG:32611&amp;bbox=4945950.00000,456800.00000,4957150.00000,469300.00000</gmd:URL>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=toronto&amp;format=image/jpeg&amp;crs=EPSG:32611&amp;bbox=4945950.000000,456800.000000,4957150.000000,469300.000000</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:DOWNLOAD-1.0-http-get-map</gco:CharacterString>
Expand Down
12 changes: 6 additions & 6 deletions msautotest/wxs/expected/ows_metadata_layer_vector.xml
Expand Up @@ -130,16 +130,16 @@ Content-type: text/xml
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:westBoundLongitude>
<gco:Decimal>-66.72432</gco:Decimal>
<gco:Decimal>-66.724329</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>-57.72168</gco:Decimal>
<gco:Decimal>-57.721680</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>41.77050</gco:Decimal>
<gco:Decimal>41.770508</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>48.47731</gco:Decimal>
<gco:Decimal>48.477314</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
Expand Down Expand Up @@ -220,7 +220,7 @@ Content-type: text/xml
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=province&amp;format=image/png&amp;crs=&amp;bbox=-76361.77343,2253355.75000,515489.03125,2747648.50000</gmd:URL>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=province&amp;format=image/png&amp;crs=&amp;bbox=-76361.773438,2253355.750000,515489.031250,2747648.500000</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:DOWNLOAD-1.0-http-get-map</gco:CharacterString>
Expand All @@ -236,7 +236,7 @@ Content-type: text/xml
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=province&amp;format=image/jpeg&amp;crs=&amp;bbox=-76361.77343,2253355.75000,515489.03125,2747648.50000</gmd:URL>
<gmd:URL>http://localhost/ows?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;width=500&amp;height=300&amp;styles=&amp;layers=province&amp;format=image/jpeg&amp;crs=&amp;bbox=-76361.773438,2253355.750000,515489.031250,2747648.500000</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:DOWNLOAD-1.0-http-get-map</gco:CharacterString>
Expand Down
4 changes: 2 additions & 2 deletions msautotest/wxs/expected/ows_metadata_wcs_capabilities100.xml
Expand Up @@ -93,8 +93,8 @@ Content-Type: text/xml; charset=UTF-8
<metadataLink metadataType="TC211" xlink:type="simple" xlink:href="http://localhost/ows?request=GetMetadata&amp;layer=toronto"/> <name>toronto</name>
<label>Toronto</label>
<lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
<gml:pos>-117.54590357301 44.665615181929</gml:pos>
<gml:pos>-117.38727661816 44.767083018819</gml:pos>
<gml:pos>-117.545903573011 44.6656151819294</gml:pos>
<gml:pos>-117.387276618167 44.7670830188199</gml:pos>
</lonLatEnvelope>
</CoverageOfferingBrief>
</ContentMetadata>
Expand Down

0 comments on commit 97c5500

Please sign in to comment.