Return Value of SnapToGrid Function

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Return Value of SnapToGrid Function

Dam-2
Hi everyone,

I am trying to use the SnapToGrid function from
PostGIS 1.0 but i can't find what this function is
returning.

In fact, i have a table on my database with some
geometry data (all MULTIPOLYGON) and when I apply this
function, I don't get geometry data but it seems to be
hexadecimal data (perhaps EWKB format but I'm really
not sure).

For example :
SELECT SnapToGrid(the_geom,100) from table_name
> 016000000010000001030000000B08210000 (...) and so on

I try to apply MPolyFromWKB function on these but
there are no change =(

If someone has any idea, that's would be very nice.

Thanks in advance

Damien



       

       
               
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Return Value of SnapToGrid Function

strk
On Thu, Jun 09, 2005 at 10:53:10AM +0200, Dam wrote:
...
> I don't get geometry data but it seems to be
> hexadecimal data (perhaps EWKB format but I'm really
> not sure).

Canonical text geometry output IS hexadecimal data in postgis-1.x.
Use asText() or asEWKT() to see a human-readable form of it.

--strk;
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Return Value of SnapToGrid Function

Dam-2
Thanks a lot !

Are the functions pgsql2shp and shp2pgsql still
working with this hexadecimal data ?

--- [hidden email] a écrit :

> On Thu, Jun 09, 2005 at 10:53:10AM +0200, Dam wrote:
> ...
> > I don't get geometry data but it seems to be
> > hexadecimal data (perhaps EWKB format but I'm
> really
> > not sure).
>
> Canonical text geometry output IS hexadecimal data
> in postgis-1.x.
> Use asText() or asEWKT() to see a human-readable
> form of it.
>
> --strk;
> _______________________________________________
> postgis-users mailing list
> [hidden email]
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
>



       

       
               
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Return Value of SnapToGrid Function

strk
On Thu, Jun 09, 2005 at 02:40:46PM +0200, Dam wrote:
> Thanks a lot !
>
> Are the functions pgsql2shp and shp2pgsql still
> working with this hexadecimal data ?

The versions shipped with 1.x work with all versions
(shp2pgsql requires a commandline flag to support 0.x,
 pgsql2shp does it automatically).

Older binary versions won't work against newer lib versions.

--strk;
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Return Value of SnapToGrid Function

Dam-2
Thanks but, i still have one problem :

~/> pgsql2shp -f base -u postgres -h cli57pl -P turing
-g column_name base_name table_name
Initializing... Done.
Dumping: XMalformed WKB

Does it mean that my function pgsql2shp is not up to
date ? Or should i add a few flags ?

--- [hidden email] a écrit :

> On Thu, Jun 09, 2005 at 02:40:46PM +0200, Dam wrote:
> > Thanks a lot !
> >
> > Are the functions pgsql2shp and shp2pgsql still
> > working with this hexadecimal data ?
>
> The versions shipped with 1.x work with all versions
> (shp2pgsql requires a commandline flag to support
> 0.x,
>  pgsql2shp does it automatically).
>
> Older binary versions won't work against newer lib
> versions.
>
> --strk;
> _______________________________________________
> postgis-users mailing list
> [hidden email]
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
>



       

       
               
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Return Value of SnapToGrid Function

strk
On Thu, Jun 09, 2005 at 04:02:09PM +0200, Dam wrote:
> Thanks but, i still have one problem :
>
> ~/> pgsql2shp -f base -u postgres -h cli57pl -P turing
> -g column_name base_name table_name
> Initializing... Done.
> Dumping: XMalformed WKB
>
> Does it mean that my function pgsql2shp is not up to
> date ? Or should i add a few flags ?

Run pgsql2shp to find out RCSID, so you're sure you are
using a version compatible with your database.
Also check output of postgis_full_version();

--strk;
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users