ArcGIS + PostGIS: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== SpatialKit ==
== ArcGIS 10.3 ==


I learned about SpatialKit (formerly "PGMap") a long time ago so it has its own page. [[SpatialKit]]
Let's look at this first, because you can simply '''read''' PostGIS data directly with no strain if you have 10.2 or 10.3 of ArcGIS.


Only works in ArcMap, so don't get any ideas about scripting or using it in ArcCatalog.
If you are only view data this is all you need to do.


== ESRI Data Interoperability ==
== ESRI Data Interoperability ==
Line 11: Line 11:
Even if you told the installer to install all extensions, note that you have to install it separately from your DVD (or disk image). It is a separate installer program. Remember to activate the extension in both ArcCatalog and ArcMap.
Even if you told the installer to install all extensions, note that you have to install it separately from your DVD (or disk image). It is a separate installer program. Remember to activate the extension in both ArcCatalog and ArcMap.


I am working with this today (2013-Jun-19) and it seems pretty fantastic. But I did not have to pay for it.
I am working with this today (2013-Jun-19) and it seems pretty fantastic. But I only paid for the $100 personal edition of ArcGIS, which includes the interop extension.


Uh well except so far I can create a connection to the database but can't access data yet. But I have great faith.
'''Except so far I can create a connection to the database but can't access data yet. But I have great faith.'''


The extension supports hundreds of file formats. It still has the usual limitation in ESRI software requiring lots of data duplication.
The extension supports hundreds of file formats. It still has the usual limitation in ESRI software requiring lots of data duplication.
Line 21: Line 21:
Direct import is fast but creating a connection gives you more settings to tweak.
Direct import is fast but creating a connection gives you more settings to tweak.


[[Image:screenshot_interop.png|Once you have a connection set up you can see the available data]]
[[Image:screenshot_interop.png||Once you have a connection set up you can see the available data]]


=== PostGIS Schema ===
=== PostGIS Schema ===
Line 28: Line 28:
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.
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.
The default schema in PostgreSQL is "public" and that's all you normally see in an ESRI interop connection. List all schemas in psql: \dn


To change it you have to set a new default search path. https://groups.google.com/forum/?fromgroups#!topic/fmetalk/zQsUUJNR5h8
To change it you have to set a new default search path. https://groups.google.com/forum/?fromgroups#!topic/fmetalk/zQsUUJNR5h8
Line 43: Line 43:
  ALTER ROLE ca_reader SET SEARCH_PATH TO st_california, co_placer_ca, co_nevada_ca, '''public''';  
  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!
  -- Note -- without 'public' you won't be able to access postgis extension!
== GISSquirrel ==
Another one to check out: http://www.gisquirrel.com/
So little time...


== 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.

Latest revision as of 23:45, 14 February 2019

ArcGIS 10.3

Let's look at this first, because you can simply read PostGIS data directly with no strain if you have 10.2 or 10.3 of ArcGIS.

If you are only view data this is all you need to do.

ESRI Data Interoperability

ESRI Data Interoperability extension is $2500 per seat.

Even if you told the installer to install all extensions, note that you have to install it separately from your DVD (or disk image). It is a separate installer program. Remember to activate the extension in both ArcCatalog and ArcMap.

I am working with this today (2013-Jun-19) and it seems pretty fantastic. But I only paid for the $100 personal edition of ArcGIS, which includes the interop extension.

Except so far I can create a connection to the database but can't access data yet. But I have great faith.

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.

Once you have a connection set up you can see the available data

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. List all schemas in psql: \dn

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!

GISSquirrel

Another one to check out: http://www.gisquirrel.com/ So little time...

RIP ZigGIS

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