<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Oh - and yes George, by "links" I meant foreign keys... I must need some sleep :)
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF151582" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> postgis-users-bounces@lists.osgeo.org [postgis-users-bounces@lists.osgeo.org] on behalf of George Silva [georger.silva@gmail.com]<br>
<b>Sent:</b> Tuesday, December 02, 2014 9:57 PM<br>
<b>To:</b> PostGIS Users Discussion<br>
<b>Subject:</b> Re: [postgis-users] Export from postGIS to ESRI Personal GeoDatabase<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>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.<br>
<br>
</div>
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.<br>
<br>
</div>
You broke up the structure inside the PostGIS database. Create a view to put it all back together, and export the view.<br>
<br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
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.<br>
<br>
</div>
For reference:<br>
<br>
<table class="">
<tbody>
<tr>
<td id="LC1" class=""><span class="">/* </span></td>
</tr>
<tr>
<td id="LC2" class=""><span class="">Infraestrutura geral.</span></td>
</tr>
<tr>
<td id="LC3" class=""><span class="">*/</span></td>
</tr>
<tr>
<td id="LC4" class=""><br>
</td>
</tr>
<tr>
<td id="LC5" class=""><span class="">CREATE</span> <span class="">SCHEMA</span> <span class="">
temporario</span>;</td>
</tr>
<tr>
<td id="LC6" class=""><br>
</td>
</tr>
<tr>
<td id="LC7" class=""><span class="">CREATE</span> <span class="">TABLE</span> <span class="">
camada</span> (</td>
</tr>
<tr>
<td id="LC8" class=""><br>
</td>
</tr>
<tr>
<td id="LC9" class="">id <span class="">SERIAL</span> <span class="">PRIMARY KEY</span>,</td>
</tr>
<tr>
<td id="LC10" class="">esquema <span class="">varchar</span>(<span class="">256</span>)
<span class="">NOT NULL</span> DEFAULT <span class=""><span class="">'</span>public<span class="">'</span></span>,</td>
</tr>
<tr>
<td id="LC11" class="">nome_tabela <span class="">varchar</span>(<span class="">256</span>)
<span class="">NOT NULL</span>,</td>
</tr>
<tr>
<td id="LC12" class="">nome <span class="">varchar</span>(<span class="">256</span>)
<span class="">NOT NULL</span>,</td>
</tr>
<tr>
<td id="LC13" class="">descricao <span class="">varchar</span>(<span class="">512</span>),</td>
</tr>
<tr>
<td id="LC14" class="">exportar <span class="">BOOLEAN</span> DEFAULT TRUE,</td>
</tr>
<tr>
<td id="LC15" class="">nome_view <span class="">varchar</span>(<span class="">512</span>)
<span class="">NULL</span></td>
</tr>
<tr>
<td id="LC16" class="">);</td>
</tr>
</tbody>
</table>
<br>
</div>
esquema = schema;<br>
nome_tabela = table_name;<br>
</div>
nome = name (textual description);<br>
</div>
descricao = description;<br>
</div>
exportar = export, true or false (the function uses this for reference);<br>
</div>
nome_view = view name, name of the view that holds the data for layer xyz<br>
<br>
</div>
<div>In a certain case, I had:<br>
<br>
</div>
<div>CREATE TABLE landuse (<br>
id SERIAL PRIMARY KEY,<br>
</div>
<div>landuse INTEGER REFERENCES landuse_code(id)<br>
</div>
<div>geometry Polygon(4326));<br>
<br>
</div>
<div>CREATE TABLE landuse_code (<br>
</div>
<div>id SERIAL PRIMARY KEY,<br>
</div>
<div>landuse VARCHAR(256));<br>
<br>
</div>
<div>CREATE VIEW vw_landuse AS<br>
SELECT<br>
</div>
<div><a href="http://l.id" target="_blank">l.id</a>,<br>
</div>
<div>code.landuse,<br>
</div>
<div>l.geometry<br>
</div>
<div>FROM<br>
</div>
<div>landuse l<br>
LEFT JOIN landuse_code code ON (l.landuse = <a href="http://code.id" target="_blank">
code.id</a>);<br>
<br>
</div>
<div>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.<br>
</div>
<div><br>
<br>
</div>
Cheers<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Dec 2, 2014 at 11:49 PM, Roxanne Reid-Bennett <span dir="ltr">
<<a href="mailto:rox@tara-lu.com" target="_blank">rox@tara-lu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<span class="">On 12/2/2014 1:37 PM, Robert Burgholzer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
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).<br>
<br>
Any thoughts, experiences would be welcome.<br>
</blockquote>
<br>
</span>I can't speak to ESRI mdb.<br>
<br>
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.<span class="HOEnZb"><font color="#888888"><br>
<br>
Roxanne</font></span>
<div class="HOEnZb">
<div class="h5"><br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature">
<div dir="ltr">George R. C. Silva<br>
SIGMA Consultoria
<div>----------------------------<br>
<div><a href="http://www.consultoriasigma.com.br/" target="_blank">http://www.consultoriasigma.com.br/</a>
<div style="padding:0px; margin-left:0px; margin-top:0px; overflow:hidden; word-wrap:break-word; color:black; font-size:10px; text-align:left; line-height:130%">
</div>
<div style="padding:0px; margin-left:0px; margin-top:0px; overflow:hidden; word-wrap:break-word; color:black; font-size:10px; text-align:left; line-height:130%">
</div>
<div style="padding:0px; margin-left:0px; margin-top:0px; overflow:hidden; word-wrap:break-word; color:black; font-size:10px; text-align:left; line-height:130%">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>