FAQ
Is it possible, outside of using a raw SQL query (PostGIS/PostgreSQL) to do
a GEOM dump.

I have a table (model) where 1 row is 1 LineString and I need to dump that
table into another table (model) where 1 row is 1 point from the LineString.

Raw SQL would be something like:

SELECT geom AS points FROM ST_DumpPoints((SELECT fl_line FROM greenland.line_paths WHERE ...));

In this case line_paths is the LineString table and fl_line the LineString
GEOM.

How can I do this within GeoDjango w/o using rawSQL and bypassing the
models?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jani Tiainen at May 31, 2013 at 7:06 am

    On Wed, 29 May 2013 07:13:04 -0700 (PDT) kpurdon wrote:

    Is it possible, outside of using a raw SQL query (PostGIS/PostgreSQL) to do
    a GEOM dump.

    I have a table (model) where 1 row is 1 LineString and I need to dump that
    table into another table (model) where 1 row is 1 point from the LineString.

    Raw SQL would be something like:

    SELECT geom AS points FROM ST_DumpPoints((SELECT fl_line FROM greenland.line_paths WHERE ...));

    In this case line_paths is the LineString table and fl_line the LineString
    GEOM.

    How can I do this within GeoDjango w/o using rawSQL and bypassing the
    models?
    Linestrings do have coord_seq property that you can iterate over and generate point geometries form that and save to another table.

    --

    Jani Tiainen

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedMay 29, '13 at 2:16p
activeMay 31, '13 at 7:06a
posts2
users2
websitedjangoproject.com

2 users in discussion

Kpurdon: 1 post Jani Tiainen: 1 post

People

Translate

site design / logo © 2022 Grokbase