Oh - and yes George, by "links" I meant foreign keys... I must need some sleep 
:)

________________________________
From: [email protected] 
[[email protected]] on behalf of George Silva 
[[email protected]]
Sent: Tuesday, December 02, 2014 9:57 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Export from postGIS to ESRI Personal GeoDatabase

By links you mean...Foreign Keys? I don't think relationships are supported. If 
you have access to some ESRI libraries, you can create the geodatabase and 
throw together an ArcPy script to create the relationships back together.

If by links you mean textual links to files or urls, yes they will be 
supported. You will need to configure the hotlink feature inside arcgis.

You broke up the structure inside the PostGIS database. Create a view to put it 
all back together, and export the view.

I'm not sure why your users insist with Personal Geodatabase. There's only one 
use case for it: use it along with access to edit some records faster. If all 
they use is ArcGIS, it won't matter to them. They'll be able to do all the same 
things.

Check out that gist again, I've added the table definition. My use case is 
similar. I have a whole different structure here, with proper foreign keys, 
etc, and views that concatenate all the useful info for end-users and I export 
those.

For reference:

/*
Infraestrutura geral.
*/


CREATE SCHEMA temporario;


CREATE TABLE camada (


id SERIAL PRIMARY KEY,
esquema varchar(256) NOT NULL DEFAULT 'public',
nome_tabela varchar(256) NOT NULL,
nome varchar(256) NOT NULL,
descricao varchar(512),
exportar BOOLEAN DEFAULT TRUE,
nome_view varchar(512) NULL
);

esquema = schema;
nome_tabela = table_name;
nome = name (textual description);
descricao = description;
exportar = export, true or false (the function uses this for reference);
nome_view = view name, name of the view that holds the data for layer xyz

In a certain case, I had:

CREATE TABLE landuse (
id SERIAL PRIMARY KEY,
landuse INTEGER REFERENCES landuse_code(id)
geometry Polygon(4326));

CREATE TABLE landuse_code (
id SERIAL PRIMARY KEY,
landuse VARCHAR(256));

CREATE VIEW vw_landuse AS
SELECT
l.id<http://l.id>,
code.landuse,
l.geometry
FROM
landuse l
LEFT JOIN landuse_code code ON (l.landuse = code.id<http://code.id>);

Them I inserted that into my layer table, specifying the view and the table 
info (the view_name column expects this to be fully qualified, if you are 
placing your views in another schema, it should be schema.view) and running 
that script to create the File Geodatabase.


Cheers

On Tue, Dec 2, 2014 at 11:49 PM, Roxanne Reid-Bennett 
<[email protected]<mailto:[email protected]>> wrote:
On 12/2/2014 1:37 PM, Robert Burgholzer wrote:
Wondering if anyone has any experience running from PG to ESRI mdb.  Basically, 
we want to use PostGIS as our master, and then replicate in GeoDB format for 
field personel to reference when they are unable to connect to the Web due to 
remote location (which happens very frequently in our line of work).

Any thoughts, experiences would be welcome.

I can't speak to ESRI mdb.

But.. Our mobile developer used an old (now unsupported) package [I don't know 
the name] with some tweaks to add LibGEOS support to SQLLite.  If you want to 
know more about that port - I can certainly make inquiries.  Our Web SaaS 
system runs on PG and the mobile app is connecting to that to pull data down to 
be available offline, which sounds a lot like your architectural needs.

Roxanne

_______________________________________________
postgis-users mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



--
George R. C. Silva
SIGMA Consultoria
----------------------------
http://www.consultoriasigma.com.br/
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to