[postgis-users] KML: unix vs windows

Laurens Jansen laurens at pz.nl
Mon Jan 18 04:21:20 PST 2010


Hi Olivier,

enclosed the result set from a PostGIS 1.3 version;

SELECT postgis_full_version();
"POSTGIS="1.3.6" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.1, 21 August
2008" USE_STATS"

SELECT asKML(the_geom) FROM table WHERE gid=1

<MultiGeometry>
  <Polygon>
    <outerBoundaryIs>
     <LinearRing>
       <coordinates>
       4.8912328883848,52.3373804295345,
       43.0455399095536 4.89118534688269

The 'old' result set are enclosed below; still there is a difference
but it is somehow smaller ... i will build the web application with
the new PostgreSQL DB to see how things work out when i put the layers
on the map etc ...

Regards Laurens
on a Unix machine:
<MultiGeometry>
 <Polygon>
  <outerBoundaryIs>
    <LinearRing>
       <coordinates>
          4.89123288936406,52.3373804303248,0
          4.89118534786195,52.3374077015756,0
          etc etc

on the Windows machine PostGIS1.4
<MultiGeometry>
  <Polygon>
    <outerBoundaryIs>
      <LinearRing>
        <coordinates>
           4.891594203993788,52.338389215425934,0
           4.891546655317309,52.338416489781068,0
2010/1/18 Laurens Jansen <laurens at pz.nl>:
> Hi Oliver
>
> again thx for your quick response;
>
> ad 2. The ST_AsGeoJson results set differ also:
>
> SELECT ST_AsGeoJson(the_geom) FROM table WHERE gid=1
> Unix:
> "{"type":"MultiPolygon","coordinates":[[[
> [121197.452000000019325,483388.473999999987427,0.000000000000000],
> [121194.232643363691750,483391.530431554128882,0.000000000000000],
> Windows:
> "{"type":"MultiPolygon","coordinates":[[[
> [121197.45200000002,483388.47399999999,0],
> [121194.23264336369,483391.53043155413,0]
>
> ad 3 the result sets for tthe transform functions
>
> SELECT ST_AsEWKT(ST_Transform(the_geom, 4326)) FROM table WHERE gid=1
> Unix:
> "SRID=4326;MULTIPOLYGON(((
> 4.89123288936406 52.3373804303248 0 0,
> 4.89118534786195 52.3374077015756 0 0,
> Windows:
> "SRID=4326;MULTIPOLYGON(((
> 4.89159420399379 52.3383892154259 0 0,
> 4.89154665531731 52.3384164897811 0 0,
>
> Iam also building a PostgreSQL with PostGIS 1.3 on a Windows machine,
> and wil check resultset against that configuration.
>
> regards Laurens
>
> 2010/1/18 Olivier Courtin <olivier.courtin at oslandia.com>:
>>
>> On Jan 17, 2010, at 11:21 PM, Laurens Jansen wrote:
>>
>> Hi Laurens,
>>
>> Some thoughts with theses informations:
>>
>> - We always met decimal differences upon platforms, but in this case,
>> differences
>>   are meaningfull and lead to wrong datas
>>
>> - PostGIS 1.4 change decimal precision handling in ST_AsKML  and ST_AsGML,
>>  so it could maybe explain this issue.
>>  Could you send the result (Windows and Unix) from ST_AsGeoJson export
>>  (this one not been changed in 1.4 branch)
>>
>> - ST_AsKML use also ST_Transform before doing is job if data are not in
>> EPSG:4326,
>>  Thanks to send also result for:  SELECT ST_AsEWKT(ST_Transform(the_geom,
>> 4326)) ...
>>
>> --
>> Olivier
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>



More information about the postgis-users mailing list