[postgis-devel] postgis ST_AsEWKT and ArcSDE's ST_ type
Paul Ramsey
pramsey at cleverelephant.ca
Thu Aug 14 11:50:46 PDT 2008
1.#QNAN000, that's sweet. Who the hell dreamed that one up? :)
P
On Thu, Aug 14, 2008 at 8:51 AM, Kevin Neufeld <kneufeld at refractions.net> wrote:
> PostGIS's 3dm parser expects to see 4 double precision fields. Additionally,
> PostGIS doesn't yet recognize the " ZM" suffix to "LINESTRING". (I believe
> PaulR had this on his TODO list for v1.4)
>
> (OpenGIS specs, version 1.2.0)
> http://www.opengeospatial.org/standards/sfa
>
>
> postgis=# select ST_AsText('LINESTRING(0 0 0.5 2.4, 1 1 2 4)'::geometry);
> st_astext
> ---------------------
> LINESTRING(0 0,1 1)
> (1 row)
>
> postgis=# select ST_AsEWKT('LINESTRING(0 0 0.5 2.4, 1 1 2 4)'::geometry);
> st_asewkt
> ---------------------------------
> LINESTRING(0 0 0.5 2.4,1 1 2 4)
> (1 row)
>
>
> It looks like you'll have to find a way to either drop your M literal from
> your coordinates, or convert it into a double that PostGIS can parse.
>
> Cheers,
> Kevin
>
>
> DNC wrote:
>>
>> Hello.
>>
>> I'm wondering if anyone can spot what's failing between ArcSDE's text
>> representation of a 3dm geometry column and what PostGIS expects. I'm
>> getting points from LINESTRING ZM in the following sql (shape is an ArcSDE
>> spatial type column, st_astext is an ArcSDE function and so is
>> st_asbinary):
>>
>> select objectid,st_astext(shape) AS SDE, ST_AsEWKT(st_asbinary(shape)) as
>> PG
>> from gdbman.srega_adutores where objectid<=7400;
>>
>> The output is like this (arranged for readability):
>> objectid=7356
>> SDE="LINESTRING ZM ( 268150.63700000 153514.32700000 0.00000000
>> 1.#QNAN000,
>> 268151.15900000 153513.31200000 0.00000000 1.#QNAN000, 268153.38500000
>> 153513.50000000 0.00000000 1.#QNAN000, 268219.31400000 153519.58500000
>> 0.00000000 1.#QNAN000, 268288.04400000 153525.98200000 0.00000000
>> 1.#QNAN000, 268357.54700000 153532.72800000 0.00000000 1.#QNAN000)"
>> PG="POINT(-179.999999497086 17.2800119090087)"
>>
>> objectid=7357
>> SDE="LINESTRING ZM ( 267722.96400000 153387.13900000 0.00000000
>> 1.#QNAN000,
>> 267723.71600000 153386.74100000 0.00000000 1.#QNAN000, 267726.41100000
>> 153387.96400000 0.00000000 1.#QNAN000, 267744.05200000 153396.02100000
>> 0.00000000 1.#QNAN000, 267747.68000000 153397.76500000 0.00000000
>> 1.#QNAN000, 267751.34800000 153399.71700000 0.00000000 1.#QNAN000,
>> 267755.24200000 153402.00900000 0.00000000 1.#QNAN000, 267758.85400000
>> 153404.35600000 0.00000000 1.#QNAN000, 267789.22500000 153424.94200000
>> 0.00000000 1.#QNAN000, 267848.41000000 153465.14800000 0.00000000
>> 1.#QNAN000, 267855.75200000 153470.07200000 0.00000000 1.#QNAN000,
>> 267858.00700000 153471.49900000 0.00000000 1.#QNAN000, 267860.58700000
>> 153472.93500000 0.00000000 1.#QNAN000, 267862.94300000 153474.07800000
>> 0.00000000 1.#QNAN000, 267885.27100000 153483.79100000 0.00000000
>> 1.#QNAN000, 267891.50100000 153486.25400000 0.00000000 1.#QNAN000,
>> 267897.54700000 153488.19700000 0.00000000 1.#QNAN000, 267903.28200000
>> 153489.61300000 0.00000000 1.#QNAN000)"
>> PG="POINT(-179.999998491257 128.160017917157)"
>>
>> Is there anyway to build a geometry from this?
>>
>> Thanks,
>> Duarte Carreira
>>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
More information about the postgis-devel
mailing list