Dear Stephen <div><br></div><div>Thanks a lot for your help!</div><div>Now let me ask one more question: </div><div>Could you tell me the best .Net 2.0/3.0/3.5 framework for PostGis?</div><div>I have to build a desktop application wich has tointeract with PostGis.</div>
<div><br></div><div>Best Regards</div><div><br></div><div>Pablo</div><div><br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 8:44 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="Wj3C7c">Pablo Tutino wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there,<br>
<br>
I'm Pablo Tutino, from Argentina.<br>
I've imported a Garmin .img DB files into polish format, then into shapes and finally into PostGis, using shp2pgsql.exe and QGIS.<br>
Now I have to create the directed graph up to use the pgRouting Library.<br>
<br>
The first error I found is that the create_graph_tables wrapper function is not included neither in pgRouting windows binaries nor sources.<br>
I found the wrapper on this link (<a href="http://postgis.refractions.net/pipermail/postgis-users/2007-April/015159.html" target="_blank">http://postgis.refractions.net/pipermail/postgis-users/2007-April/015159.html</a>).<br>
<br>
The problem is the DB's schema I was able to import to PostGis is not like the one in the example, <a href="http://www.davidgis.fr/documentation/pgrouting-1.02/" target="_blank">http://www.davidgis.fr/documentation/pgrouting-1.02/</a>.<br>
<br>
That schema includes id,source,target,x1,y1,x2,y2,cost,reverse_cost,oneway,length,rule,to_cost, but mine doesn't have x1,y1,x2,y2.<br>
<br>
How can I solve this?<br>
I mean: 1) How can I create a graph table from a schema containing only these fields:<br>
{gid integer NOT NULL,"LABEL" character varying(50),"TYPE" character varying(10),"LEVEL" character varying(9),the_geom geometry }? (the source, target and edge were created using assing_vertex_id function)<br>
<br>
2) how can I use the correct create_schema_tables function?<br>
<br>
Thanks a lot Pablo<br>
<br>
</blockquote>
<br></div></div>
alter table mytable add column x1 float;<br>
alter table mytable add column y1 float;<br>
alter table mytable add column x2 float;<br>
alter table mytable add column y2 float;<br>
update mytable set<br>
x1 = x(st_startpoint(the_geom)),<br>
y1 = y(st_startpoint(the_geom)),<br>
x2 = x(st_endpoint(the_geom)),<br>
y2 = y(st_endpoint(the_geom));<br>
vacuum analyze mytable;<br>
<br>
Should probably do it.<br>
<br>
-Steve<br>
<a href="http://imaptools.com/" target="_blank">http://imaptools.com/</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Ing. Pablo Hernán Tutino<br>DIVENTI - Ingeniería y Desarrollo<br><a href="mailto:pablo.tutino@diventi.com.ar">pablo.tutino@diventi.com.ar</a><br><a href="http://www.diventi.com.ar">www.diventi.com.ar</a><br>
TE: +54-11-1569719001<br>
</div>