JOIN tabel di postgis

46 views
Skip to first unread message

Airin

unread,
Oct 11, 2012, 9:30:09 PM10/11/12
to idmap...@googlegroups.com
Ada yang tahu gimana caranya join tabel spasial dan tabel non-spasial di postgis database? Ini ada contoh yang saya buat tapi hasilnya error. Mohon pencerahannya.

LAYER
NAME "spasial"
CONNECTIONTYPE postgis
CONNECTION "host=localhost user=postgres password=1 dbname=balikpapandb port=5432"
DATA "the_geom from (SELECT spasial.gid, spasial.the_geom, kategori.kategori
          FROM spasial JOIN kategori ON spasial.id_kategori = kategori.id_kategori)
           as subquery using unique gid using srid=4326"
STATUS ON
TYPE POINT
LABELITEM "nama"

shizu...@yahoo.com

unread,
Oct 14, 2012, 8:15:50 AM10/14/12
to idmap...@googlegroups.com
COBA DENGAN MAPFILE D BAWAH INI
LAYER
NAME "spasial"
STATUS ON
CONNECTIONTYPE POSSTGIS
CONNECTION 'host=localhost user=postgres password=1 dbname=balikpapandb port=5432'
DAT'A 'the_geom from (SELECT "spasial".gid, "spasial".the_geom, "kategori".kategori

          FROM "spasial" JOIN "kategori" ON "spasial".id_kategori =" kategor"i.id_kategori)
           as subquery using unique gid using srid=4326'

TYPE POINT
LABELITEM "nama"

Dyah Setyorini

unread,
Oct 18, 2012, 5:22:47 PM10/18/12
to idmap...@googlegroups.com
makasih banget buat sarannya, tapi sayangnya kurang berhasil. tidak error tetapi gambarnya yang gak ada.

aji setyo

unread,
Oct 18, 2012, 7:50:13 PM10/18/12
to idmap...@googlegroups.com

ITU spasial.gid coba dibuat begini "spasial.gid as gid"

shizu...@yahoo.com

unread,
Oct 23, 2012, 5:52:27 AM10/23/12
to idmap...@googlegroups.com
Ralat

LAYER
NAME "spasial"
STATUS ON
CONNECTIONTYPE POSSTGIS
CONNECTION 'host=localhost user=postgres password=1 dbname=balikpapandb port=5432'
DAT'A 'the_geom from (SELECT "spasial".gid, "spasial".the_geom, "kategori".kategori

          FROM "spasial" JOIN "kategori" ON "spasial".id_kategori =" kategori".id_kategori)
           as subquery using unique gid using srid=4326'

TYPE POINT
LABELITEM "nama"

*klo tidak error tapi tidak muncul juga, coba check relasi antar tabelnya apakah sudah benar.
dan path image nya

Pada Jumat, 12 Oktober 2012 8:30:09 UTC+7, Airin menulis:
Reply all
Reply to author
Forward
0 new messages