Problem with st_dumppoints

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

Problem with st_dumppoints

"Sebastian Teßmer"
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

hugfr

Hi,

If I understand what you're looking for, I think you just need to call path and geom separately. This would look like:
WITH yourquery AS (yourquery)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourquery

And if you want to collect all points of an object you could do that using a group by clause on the object identifier and st_collect((st_dumppoints).geom).

HTH

Hug


Le 5 août 2016 8:56 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

Nathan Wagner-2
In reply to this post by "Sebastian Teßmer"
I can probably help, since I wrote the implementation, but email should
be plain text, so if you could resend your issue in plain text, I'd have
a fighting chance to read it.

--
nw
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

"Sebastian Teßmer"
Hi Nathan,
my Mail in plain text
 
i have a problem with st_dumppoints and i hope you can help...
my sql is:
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
with the result (for example):
1,1,1, and then a wkt geometry.....
at the beginning, i have that i want, but the geomtery isn't that what i want.
I need a geometry like MULTIPOINT(.....)
I want a result like:
 
Column 1  Column 2
1,1,1 Multipoint(Point in WGS84)
Can anybody help me?
Thank you very munch!!!
Sebastian
 
Gesendet: Freitag, 05. August 2016 um 09:28 Uhr
Von: "Nathan Wagner" <[hidden email]>
An: "Sebastian Te??mer" <[hidden email]>
Cc: [hidden email]
Betreff: Re: [postgis-users] Problem with st_dumppoints
I can probably help, since I wrote the implementation, but email should
be plain text, so if you could resend your issue in plain text, I'd have
a fighting chance to read it.

--
nw

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

"Sebastian Teßmer"
In reply to this post by hugfr
Hi Hugues, I try it.
 
Thank you very much... Sebastian
 
Gesendet: Freitag, 05. August 2016 um 09:20 Uhr
Von: "Hugues François" <[hidden email]>
An: "PostGIS Users Discussion" <[hidden email]>
Betreff: Re: [postgis-users] Problem with st_dumppoints

Hi,

If I understand what you're looking for, I think you just need to call path and geom separately. This would look like:
WITH yourquery AS (yourquery)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourquery

And if you want to collect all points of an object you could do that using a group by clause on the object identifier and st_collect((st_dumppoints).geom).

HTH

Hug

 
Le 5 août 2016 8:56 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 
_______________________________________________ postgis-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

"Sebastian Teßmer"
In reply to this post by hugfr
Hi Hugues,
 
i try it like:
 
WITH flstfinal AS (flstfinal)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM flstfinal
 
and i have this mistake:
 
FEHLER:  Syntaxfehler bei „flstfinal“
LINE 1: WITH flstfinal AS (flstfinal)
                           ^
********** Fehler **********
FEHLER: Syntaxfehler bei „flstfinal“
SQL Status:42601
Zeichen:20
 
Where is my fault?
 
Gesendet: Freitag, 05. August 2016 um 09:20 Uhr
Von: "Hugues François" <[hidden email]>
An: "PostGIS Users Discussion" <[hidden email]>
Betreff: Re: [postgis-users] Problem with st_dumppoints

Hi,

If I understand what you're looking for, I think you just need to call path and geom separately. This would look like:
WITH yourquery AS (yourquery)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourquery

And if you want to collect all points of an object you could do that using a group by clause on the object identifier and st_collect((st_dumppoints).geom).

HTH

Hug

 
Le 5 août 2016 8:56 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 
_______________________________________________ postgis-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

hugfr
In reply to this post by "Sebastian Teßmer"

Hi,

Should be
WITH yourwithname AS (
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal
)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourwithname

It is always better if you can choose non ambiguous aliases.

Hug


Le 5 août 2016 9:48 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi Hugues,
 
i try it like:
 
WITH flstfinal AS (flstfinal)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM flstfinal
 
and i have this mistake:
 
FEHLER:  Syntaxfehler bei „flstfinal“
LINE 1: WITH flstfinal AS (flstfinal)
                           ^
********** Fehler **********
FEHLER: Syntaxfehler bei „flstfinal“
SQL Status:42601
Zeichen:20
 
Where is my fault?
 
Gesendet: Freitag, 05. August 2016 um 09:20 Uhr
Von: "Hugues François" <hugues.francois@irstea.fr>
An: "PostGIS Users Discussion" <postgis-users@lists.osgeo.org>
Betreff: Re: [postgis-users] Problem with st_dumppoints

Hi,

If I understand what you're looking for, I think you just need to call path and geom separately. This would look like:
WITH yourquery AS (yourquery)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourquery

And if you want to collect all points of an object you could do that using a group by clause on the object identifier and st_collect((st_dumppoints).geom).

HTH

Hug

 
Le 5 août 2016 8:56 AM, Sebastian Teßmer <SebastianTessmer@gmx.de> a écrit :
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with st_dumppoints

"Sebastian Teßmer"
Hi Hug,
 
wonderfull, many thanks!!!!
 
with
st_astext((st_dumppoints).geom) i have my geometry in Multipoint.
 
One Question i still have
In my table flstfinal, i have some other attributes like zaehler, nenner or an area.
Is there any option that i can see the attributes in this sql result, for example:
 
WITH yourwithname AS (
 SELECT  zaehler, nenner, area, st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal
 )
 SELECT  (st_dumppoints).path, st_astext((st_dumppoints).geom) FROM yourwithname
 
Or something like this?
 
Sebastian
 
Gesendet: Freitag, 05. August 2016 um 09:57 Uhr
Von: "Hugues François" <[hidden email]>
An: "PostGIS Users Discussion" <[hidden email]>
Betreff: Re: [postgis-users] Problem with st_dumppoints

Hi,

Should be
WITH yourwithname AS (
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal
)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourwithname

It is always better if you can choose non ambiguous aliases.

Hug

 
Le 5 août 2016 9:48 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi Hugues,
 
i try it like:
 
WITH flstfinal AS (flstfinal)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM flstfinal
 
and i have this mistake:
 
FEHLER:  Syntaxfehler bei „flstfinal“
LINE 1: WITH flstfinal AS (flstfinal)
                           ^
********** Fehler **********
FEHLER: Syntaxfehler bei „flstfinal“
SQL Status:42601
Zeichen:20
 
Where is my fault?
 
Gesendet: Freitag, 05. August 2016 um 09:20 Uhr
Von: "Hugues François" <[hidden email]>
An: "PostGIS Users Discussion" <[hidden email]>
Betreff: Re: [postgis-users] Problem with st_dumppoints

Hi,

If I understand what you're looking for, I think you just need to call path and geom separately. This would look like:
WITH yourquery AS (yourquery)
SELECT (st_dumppoints).path, (st_dumppoints).geom FROM yourquery

And if you want to collect all points of an object you could do that using a group by clause on the object identifier and st_collect((st_dumppoints).geom).

HTH

Hug

 
Le 5 août 2016 8:56 AM, Sebastian Teßmer <[hidden email]> a écrit :
Hi everybody,
 
i have a problem with st_dumppoints and i hope you can help...
 
my sql is:
 
SELECT st_dumppoints(st_transform(flstfinal.geom, 4326)) AS st_dumppoints FROM flstfinal;
 
with the result (for example):
 
("{1,1,1}", and then a wkt geometry.....
 
at the beginning, i have that i want, but the geomtery isn't that what i want.
 
I need a geometry like MULTIPOINT(.....)
 
I want a result like:
 
Column 1      |      Column 2
1,1,1            |     Multipoint(Point in WGS84)
....
Can anybody help me?
 
Thank you very munch!!!
 
Sebastian
 
 
_______________________________________________ postgis-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________ postgis-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users