ArcGIS + PostGIS: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
m Created page with ' See SpatialKit instead. RIP ZigGIS. If you find comments out there on ZigGIS you can safely ignore them, the project has died.'
 
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
== SpatialKit ==


See [[SpatialKit]] instead.
I learned about SpatialKit (formerly "PGMap") a long time ago so it has its own page. [[SpatialKit]]
 
Only works in ArcMap, so don't get any ideas about scripting or using it in ArcCatalog.
 
== ESRI ==
 
ESRI Data Interoperability extension $2500 per seat
 
I am working with this today (2013-Jun-19) and it seems pretty fantastic. But I did not have to pay for it.
 
The extension supports hundreds of file formats. It still has the usual limitation in ESRI software requiring lots of data duplication.
You can directly view PostGIS layers in ArcMap, but to edit you have to copy the data out, edit it, then copy it back in.
 
You can do a "direct import" to view data or you can create an "Interoperability Connection" which is kind of like a "GIS Server" connection or a layer file.
Direct import is fast but creating a connection gives you more settings to tweak.
 
=== PostGIS Schema ===
 
To allow working with many regions in one database, so that I can perform operations over all of them, but to keep things organized,
I keep each geographic region in a different schema. So for example I have one database called gisdata containing two schema, st_california and co_placer_ca.
 
The default schema in PostgreSQL is "public" and that's all you normally see in an ESRI interop connection.
 
To change it you have to set a new default search path. https://groups.google.com/forum/?fromgroups#!topic/fmetalk/zQsUUJNR5h8
 
I can manage this with roles, so I can have a "ca_reader" role that is allowed to read ("select" permission) data from selected schemas by setting the path appropriately
 
CREATE USER ca_reader WITH PASSWORD 'XXXXXX';
GRANT USAGE ON SCHEMA '''public''' TO ca_reader;
GRANT USAGE ON SCHEMA co_nevada_ca TO ca_reader;
GRANT USAGE ON SCHEMA co_placer_ca TO ca_reader;
GRANT USAGE ON SCHEMA st_california TO ca_reader;
GRANT SELECT ON TABLE public.geometry_columns TO ca_reader;
GRANT SELECT ON TABLE public.spatial_ref_sys TO ca_reader;
ALTER ROLE ca_reader SET SEARCH_PATH TO st_california, co_placer_ca, co_nevada_ca, '''public''';
-- Note -- without 'public' you won't be able to access postgis extension!
 
== RIP ZigGIS ==


RIP ZigGIS.
If you find comments out there on ZigGIS you can safely ignore them, the project has died.
If you find comments out there on ZigGIS you can safely ignore them, the project has died.

Revision as of 17:32, 19 June 2013

SpatialKit

I learned about SpatialKit (formerly "PGMap") a long time ago so it has its own page. SpatialKit

Only works in ArcMap, so don't get any ideas about scripting or using it in ArcCatalog.

ESRI

ESRI Data Interoperability extension $2500 per seat

I am working with this today (2013-Jun-19) and it seems pretty fantastic. But I did not have to pay for it.

The extension supports hundreds of file formats. It still has the usual limitation in ESRI software requiring lots of data duplication. You can directly view PostGIS layers in ArcMap, but to edit you have to copy the data out, edit it, then copy it back in.

You can do a "direct import" to view data or you can create an "Interoperability Connection" which is kind of like a "GIS Server" connection or a layer file. Direct import is fast but creating a connection gives you more settings to tweak.

PostGIS Schema

To allow working with many regions in one database, so that I can perform operations over all of them, but to keep things organized, I keep each geographic region in a different schema. So for example I have one database called gisdata containing two schema, st_california and co_placer_ca.

The default schema in PostgreSQL is "public" and that's all you normally see in an ESRI interop connection.

To change it you have to set a new default search path. https://groups.google.com/forum/?fromgroups#!topic/fmetalk/zQsUUJNR5h8

I can manage this with roles, so I can have a "ca_reader" role that is allowed to read ("select" permission) data from selected schemas by setting the path appropriately

CREATE USER ca_reader WITH PASSWORD 'XXXXXX';
GRANT USAGE ON SCHEMA public TO ca_reader;
GRANT USAGE ON SCHEMA co_nevada_ca TO ca_reader;
GRANT USAGE ON SCHEMA co_placer_ca TO ca_reader;
GRANT USAGE ON SCHEMA st_california TO ca_reader;
GRANT SELECT ON TABLE public.geometry_columns TO ca_reader;
GRANT SELECT ON TABLE public.spatial_ref_sys TO ca_reader;
ALTER ROLE ca_reader SET SEARCH_PATH TO st_california, co_placer_ca, co_nevada_ca, public; 
-- Note -- without 'public' you won't be able to access postgis extension!

RIP ZigGIS

If you find comments out there on ZigGIS you can safely ignore them, the project has died.