postgis - multipolygon tipindeki verinin düzenlenerek single forma dönüştürülmesi - tüm script

create table uygulama.uygulama_single as
SELECT objectid, ilcekod, mahallekod, yapankod, kontroledenkod, uygulamatipikod,
uygulamadurumkod, askicikistarih, askiinistarih, encumentarih,
encumensayi, alan, ifraztevhidalan,

(st_dump(poly)).geom :: geometry (polygon, 5256) as poly,

aciklama, dosya, yil,
deger1, deger2
FROM uygulama.uygulama
;

create table uygulama.uygulama_multi as
select * from uygulama.uygulama
;

ALTER TABLE uygulama.uygulama_multi ADD COLUMN idd integer;

CREATE SEQUENCE uygulama.sq_tum
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

update uygulama.uygulama_multi set idd = nextval('uygulama.sq_tum')
;

ALTER TABLE uygulama.uygulama_multi ALTER COLUMN idd SET NOT NULL;
ALTER TABLE uygulama.uygulama_multi ALTER COLUMN idd SET DEFAULT nextval('uygulama.sq_tum'::regclass);

ALTER TABLE uygulama.uygulama_multi ADD CONSTRAINT pk_uygulama_multi PRIMARY KEY(idd);

delete from uygulama.uygulama_multi
;

INSERT INTO uygulama.uygulama_multi(
objectid, ilcekod, mahallekod, yapankod, kontroledenkod, uygulamatipikod,
uygulamadurumkod, askicikistarih, askiinistarih, encumentarih,
encumensayi, alan, ifraztevhidalan, poly, aciklama, dosya, yil,
deger1, deger2, idd)


SELECT objectid, ilcekod, mahallekod, yapankod, kontroledenkod, uygulamatipikod,
uygulamadurumkod, askicikistarih, askiinistarih, encumentarih,
encumensayi, alan, ifraztevhidalan,

poly,

aciklama, dosya, yil,
deger1, deger2, nextval('uygulama.sq_tum')
FROM uygulama.uygulama
;

delete from uygulama.uygulama_single
;

INSERT INTO uygulama.uygulama_single(
objectid, ilcekod, mahallekod, yapankod, kontroledenkod, uygulamatipikod,
uygulamadurumkod, askicikistarih, askiinistarih, encumentarih,
encumensayi, alan, ifraztevhidalan, poly, aciklama, dosya, yil,
deger1, deger2, idd)


SELECT objectid, ilcekod, mahallekod, yapankod, kontroledenkod, uygulamatipikod,
uygulamadurumkod, askicikistarih, askiinistarih, encumentarih,
encumensayi, alan, ifraztevhidalan,

(st_dump(poly)).geom :: geometry (polygon, 5256),

aciklama, dosya, yil,
deger1, deger2, nextval('uygulama.sq_tum')
FROM uygulama.uygulama
;

create or replace view uygulama.single_to_multi as
select distinct objectid,


(st_dump (ST_Multi(st_union(poly)) )).geom :: geometry (polygon,5256) as poly
--ST_Multi(st_union(poly)) :: geometry (MultiPolygon,5256) as poly

from uygulama.uygulama_single
group by objectid
;

update uygulama.uygulama_multi
set poly = null;

ALTER TABLE uygulama.uygulama_multi ALTER COLUMN poly type geometry(Polygon, 5256);

update uygulama.uygulama_multi um
set poly = sm.poly
from uygulama.single_to_multi sm
where um.objectid = sm.objectid
;

Labels - Etiketler

3D (14) 3D Analyst (5) 3D Studio Max (2) ABD (2) About building an SQL expression (1) Access (4) Adding hyperlinks to features (1) Adding OLE DB connections (1) administrative areas (1) Adobe (1) Adobe illustrator (1) Adobe Reader (1) Adobe Reader Analysis Tool (1) aggregate (1) Aggregate Polygons (2) An overview of ModelBuilder (1) An overview of writing geoprocessing scripts (2) analysis (2) Append (4) ArcCatalog (1) ArcGIS (63) ArcGIS 9.3 Map Export PDF (2) ArcGIS Mobile (1) ArcGIS Server (9) ArcGIS Server 9.3 Web Help (1) Arcgis Server 10 (2) Architectural (1) arcscene (3) arcscripts (5) ArcSDE (1) Arcview (1) Arcview ile kml yi shp ye dönüştürme (1) AutoCAD (2) AutoVue (1) Bina Verisini Düzenlerken (2) bölme (1) CAD (3) CAD/GIS (87) calculate (1) canada data (2) CenterPoint (1) Chicago (2) CityEngine (1) CitySurf (5) clip (1) Common line editing tasks (1) Common polygon editing tasks (1) Contour (1) Create Node (1) çevreleyenden bilgi al (2) database (1) Database Browser (1) date (1) definition query (1) demicron (1) Dissolve (1) download (6) dünya (1) dwg (1) Eğim Analizi (1) Eliminate (1) English (67) Erciyes (4) error (1) Esri (2) Eşyükselti (1) etiket (1) Excel (4) export (1) expression (2) Flip (Çizgi Yönünü değiştirir) (2) Free GIS Software (1) freeWRL (2) fwtools (1) fwtools ile kml ve shp arası dönüşüm (1) FWTools Shell (1) Geomedia (14) Geoprocessing Quick Guide (1) geoserver (3) geoserver kurulumu (1) geoserver labeling (2) geoserver labeling not supported with qgis (1) Geoyol u düzenlerken (1) GIS Data (2) GIS Data of America (2) Glonet (1) google (1) group by (1) halihazır (1) hidroloji (1) How Import from CAD (Conversion) works (1) html (1) hydrology (10) hyperlink (1) hystorical GIS (1) ilk karakteri silen sql (1) insert (2) intersect (1) İzohips (1) java (2) kml (2) kml to shp (3) konya (1) label (2) line editing (1) Link (1) links (40) M and Z Values (3) MapBuilder (1) Maplex Label Engine (1) Maps (1) MapShaper (1) Max (1) MBR (1) mdb (1) Mekansal Analiz (1) merge (1) Mimari (1) Mobile (1) multi Geometry (3) multipart to single part (1) multipoint (1) NetCAD (19) netcad Network Lisans İzleyicisi (1) Netcad Program No (1) Netcad TILE (1) NetCAD to Oracle Spatial (5) NetCAD ve ArcGIS farkı (3) netcadde wms oluşturmak için workspace export (1) netgis (1) netgis server (1) Network Analyst (3) Node (1) ObjectID kolonu problemi (1) online wms viewer (1) Oracle (16) Oracle Spatial (3) Oracle veri tabanının yeniden başlatılması (1) output mode (1) Parcel (2) Parcel Editor (1) parsel (1) pdf (3) pdf i html ye dönüştürme (1) pdftohtml (1) PHP (1) point (1) PostGIS (30) Postgresql (8) Postgresql otomatik yedek alma (1) Projection (1) Pyton (1) Raster (2) register (1) Rename (1) RepairGeometry (1) replace (2) Routing (1) sdelayer (1) Select by Location: graphical examples (1) server (1) shape viewer (2) shp (7) shp2sdo (1) single Geometry (3) sld (1) snap (1) social explorer (1) sonra eklenecek (1) Spatial Join (Analysis) (2) spatialanalysisonline (1) Split Line at Vertices (Data Management) (ArcInfo only) (1) Sql (48) SQL reference (1) SRID (1) su yatakları (1) subst (1) subtract (1) sum (1) synchronize (1) Şehir ve Bölge Planlama (1) tablo (1) tablodan tabloya veri aktarma (1) terrain (1) Texas (2) time (1) tin (3) tin edit (1) topology (5) Topology check (2) Traffic Simulation (1) Trafik (1) Transform (1) trim (1) Ulaşım (1) Ulaşım Planlama (1) union (1) Union ve Merge (1) Unregister As Versioned (1) update (2) UrbanSim (1) veri (2) Vermont (1) Versioning (2) vertex lere nokta atar (1) video (17) WFS (2) wirefusion (1) wms (3) wmware (1) wmx (1) Working with Microsoft Access files in ArcGIS (1) Working with Microsoft Excel files in ArcGIS (1) world (1) wrl (1) yol (2) yol kırma (2) Yol Uzunluk (2) yolkır (1) Z değeri edit (1)