Postgresql etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Postgresql etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

postgis geomerty columns

select
*
from geometry_columns
where
f_table_name like 'geoplan%'
;

Postgresql otomatik yedek alma

fonksiyon oluşturulur
CREATE OR REPLACE FUNCTION admin.copy_haritapaftabin(IN p_path text, IN p_filename_prefix text, OUT file_and_path text)
RETURNS text AS
$BODY$
DECLARE
qry TEXT;
BEGIN
file_and_path := RTRIM(p_path,'/') || '/' || p_filename_prefix || '_' || to_char(CURRENT_TIMESTAMP, 'YYYY-MM-DD-HH-MI'::text) || '.csv';

qry := FORMAT('COPY (select * from harita.paftabin) TO %L CSV HEADER',file_and_path);
EXECUTE qry;
END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT SECURITY DEFINER
COST 100;


select komutu tabloyu csv olarak dışarı alır. job yapılabilir

SELECT admin.copy_haritapaftabin('e:\YEDEK\VT\csv','haritapaftabin');

pg_stat_activity

SELECT * FROM pg_stat_activity

--where usename = 'user'
order by usename;

substr, replace, to_date, BMK

select

s.bilgi, s.detay1

, replace("bilgi", 'BMK=', '') as bmk
, substr(replace("bilgi", 'BMK=', ''),7,4) as yil
, substr(replace("bilgi", 'BMK=', ''),4,2) as ay
, substr(replace("bilgi", 'BMK=', ''),1,2) as gun
, substr(replace("bilgi", 'BMK=', ''),12,3) as sayi
, bsmtarih
, bsmsayi


from

planbesbin.mnip_sinir s

where

s.bilgi like 'BMK=%'


--------------------

UPDATE planbesbin.mnip_sinir s
SET bsmtarih =

to_date(

substr(replace("bilgi", 'BMK=', ''),7,4) ||'-'||
substr(replace("bilgi", 'BMK=', ''),4,2) ||'-'||
substr(replace("bilgi", 'BMK=', ''),1,2)
, 'YYYY.MM.DD'
)
,
bsmsayi = cast(substr(replace("bilgi", 'BMK=', ''),12,3) as integer)

where
s.bilgi like 'BMK=%'

to_char - tarih formatı

CREATE OR REPLACE FUNCTION planbesbin.fn_bmk()
RETURNS trigger AS
$$
BEGIN

SELECT ('BMK=' || TO_CHAR(s.bsmtarih, 'DD.MM.YYYY') || '/' || s.bsmsayi )
INTO NEW.bmk

FROM
planbesbin.mnip_sinir s
,
planbesbin.mnip_cizgi c



WHERE
st_intersects (ST_StartPoint(NEW.poly), s.poly)
AND ST_Disjoint (ST_EndPoint(NEW.poly), s.poly)

AND NEW.mnip_kod = 80101 AND NEW.detay1= '1'

;
RETURN NEW;
END;
$$
LANGUAGE 'plpgsql';

----------------------


CREATE TRIGGER tg_bmk_BEFORE
BEFORE INSERT OR UPDATE ON planbesbin.mnip_cizgi
FOR EACH ROW EXECUTE PROCEDURE planbesbin.fn_bmk();


CREATE TRIGGER tg_bmk_AFTER
AFTER INSERT OR UPDATE ON planbesbin.mnip_cizgi
FOR EACH ROW EXECUTE PROCEDURE planbesbin.fn_bmk();

TRIGGER - bmk

CREATE OR REPLACE FUNCTION planbesbin.fn_bmk()
RETURNS trigger AS
$$
BEGIN

SELECT ('BMK=' || s.bsmtarih ||'/'|| s.bsmsayi)
INTO NEW.bmk

FROM
planbesbin.mnip_sinir s
,
planbesbin.mnip_cizgi c



WHERE
st_intersects (ST_StartPoint(NEW.poly), s.poly)
AND ST_Disjoint (ST_EndPoint(NEW.poly), s.poly)

AND NEW.mnip_kod = 80101 AND NEW.detay1= '1'

;
RETURN NEW;
END;
$$
LANGUAGE 'plpgsql';

----------------------


CREATE TRIGGER tg_bmk_BEFORE
BEFORE INSERT OR UPDATE ON planbesbin.mnip_cizgi
FOR EACH ROW EXECUTE PROCEDURE planbesbin.fn_bmk();


CREATE TRIGGER tg_bmk_AFTER
AFTER INSERT OR UPDATE ON planbesbin.mnip_cizgi
FOR EACH ROW EXECUTE PROCEDURE planbesbin.fn_bmk();

You must copy the latest ST_GEOMETRY and dependent libraries to the PostgreSQL software location

Problem:
Create Enterprise Geodatabase Error

https://geonet.esri.com/thread/56840

SOLUTION:
Place the ST_Geometry libraries in the PostgreSQL lib directory

Geodatabase creation in PostgreSQL relies on the presence of the ST_Geometry library. You must place the appropriate library in the lib directory where PostgreSQL is installed before you can create a geodatabase. ST_Geometry libraries can be found in the DatabaseSupport folder of your ArcGIS client installation.

Since this tutorial assumes your PostgreSQL installation is on a Windows server, you will use the ST_Geometry library found in the Windows64 folder.
Steps:

In Windows Explorer, navigate to the location of the Windows ST_Geometry library in your ArcGIS client installation directory.

The default location for ArcGIS for Desktop on 64-bit Windows operating systems is C:\Program Files (x86)\ArcGIS\Desktop\DatabaseSupport\PostgreSQL\Windows64; on 32-bit Windows operating systems, it is C:\Program Files\ArcGIS\Desktop\DatabaseSupport\PostgreSQL\Windows64.
Copy st_geometry.dll from this location.
Navigate to the PostgreSQL lib directory on the database server and paste the library to that location.

On Windows, the default location is C:\Program Files\PostgreSQL\9.0\lib.

Artık Yeni Şeyler Söyleme Zamanı

Netcad, Netcad TILE, Postgresql, PostGIS, Arcgis Server 10,

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)