<br><br><div class="gmail_quote">2011/2/18 Stephanos Charalambous <span dir="ltr"><<a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you Sirs.<br>
<br>
I tried the thinks that you have told me.<br>
1. As Daniel suggested, I ran the command: psql gis "C:\Users\User\Desktop\900913.sql" in the psql shell and when I checked the file "spatial_ref_sys.sql", the entry 900913 is in the table.<br>
<br>
2. As Stephen suggested, I edited the epsg file in the "proj" folder and added the Spherical Mercator projection entry.<br>
<br>
3. I changed the assign_vertex_id command to:<br>
SELECT assign_vertex_id('testNic', 1.0, 'the_geom', 'gid')<br>
<br>
4. Restart Computer<br>
<br>
THE RESULT: The same error occurs.<br>
<br>
Where did I do wrong?<br></blockquote><div><br></div><div><br></div><div>That's not clear to me. Would you be able to use a newer version of PostGIS? I think they contain 900913 projection.</div><div>Or you could try to reproject your geometry once to WGS84 and then try again and see if this makes a difference.</div>
<div><br></div><div>Daniel</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Thanks,<br>
Stephanos<br>
<br>
<br>
--- Óôéò ÐÝì., 17/02/11, ï/ç Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> Ýãñáøå:<br>
<br>
> Áðü: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>
> ÈÝìá: Re: [pgrouting-dev] Cannot create topology<br>
> Ðñïò: <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> Çìåñïìçíßá: ÐÝìðôç, 17 ÖåâñïõÜñéïò 2011, 20:27<br>
<div><div></div><div class="h5">> You might also need to add it to:<br>
><br>
> /usr/share/proj/epsg<br>
><br>
> # Spherical Mercator projection<br>
> <900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0<br>
> +lon_0=0.0<br>
> +x_0=0.0 +y_0=0 +k=1.0 +units=m +over +nadgrids=@null<br>
> +no_defs <><br>
><br>
> Also, when you ran assign_vetrix_id() your tolerance was<br>
> something like<br>
> 0.000001 which is appropriate if your data is in degrees,<br>
> but this<br>
> Mercator projection is in meters so your tolerance should<br>
> be something<br>
> in a range like 5.0 - 0.5, maybe start with 1.0 and see how<br>
> that works.<br>
> if you rebuild you table and try different values for<br>
> tolerance, you can<br>
> look at the number of unique node numbers. When the number<br>
> suddenly gets<br>
> smaller you probably have it too large.<br>
><br>
> -Steve<br>
><br>
> On 2/17/2011 1:14 PM, Daniel Kastl wrote:<br>
> > I think SRID = 900913 is not in the spatial_ref_sys<br>
> table, if you're<br>
> > using an older version of PostGIS.<br>
> > You can take it from here:<br>
> > <a href="http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/900913.sql" target="_blank">http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/900913.sql</a><br>
> ><br>
> > <<a href="http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/900913.sql" target="_blank">http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/900913.sql</a>>Daniel<br>
> ><br>
> ><br>
> > 2011/2/18 Stephanos Charalambous <<a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a><br>
> > <mailto:<a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a>>><br>
> ><br>
> > Thanks Daniel for the quick<br>
> response.<br>
> ><br>
> > The shapefile which i imported<br>
> was in google web mercator, so during<br>
> > the import I set the SRID =<br>
> 900913. The geom constraint has the same<br>
> > value too.<br>
> ><br>
> > How can I do the necessary<br>
> checks?<br>
> ><br>
> > With Regards,<br>
> ><br>
> > Stephanos Charalambous<br>
> ><br>
> > On 17 Öåâ 2011, at 16:58,<br>
> Daniel Kastl <<a href="mailto:daniel@georepublic.de">daniel@georepublic.de</a><br>
> > <mailto:<a href="mailto:daniel@georepublic.de">daniel@georepublic.de</a>>><br>
> wrote:<br>
> ><br>
> >> Hello Stephanos,<br>
> >><br>
> >> As the error says, there<br>
> seems to be something wrong with your<br>
> >> SRID. You should check if<br>
> the constraint on "the_geom" and the<br>
> >> entry in the<br>
> "geometry_columns" table are OK? Does it have an SRID<br>
> >> or is it set -1?<br>
> >><br>
> >> Daniel<br>
> >><br>
> >><br>
> >> 2011/2/17 Stephanos<br>
> Charalambous<br>
> >> <<mailto:<a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a>><a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a><br>
> >> <mailto:<a href="mailto:stephanos_ch@yahoo.gr">stephanos_ch@yahoo.gr</a>>><br>
> >><br>
> >> Hello,<br>
> >><br>
> >> I am kind of<br>
> new in using pgrouting and I would really like<br>
> >> your help.<br>
> >><br>
> >> I have<br>
> imported a road network, called "testNic" (from<br>
> >> shapefile)<br>
> into a PostgreSQL database using QGIS and pgAdmin.<br>
> >> Then, I<br>
> added the necessary columns, source, target and cost,<br>
> >> and created<br>
> the geom_idx. The problem that I am facing is that<br>
> >> I cannot<br>
> create the topology using the query:<br>
> >><br>
> >> SELECT<br>
> assign_vertex_id('testNic', 0.00001, 'the_geom', 'gid');<br>
> >><br>
> >> I get the<br>
> following error, and i can't locate where the<br>
> >> mistake is.<br>
> >><br>
> >> <br>
> NOTICE: CREATE TABLE will create<br>
> implicit sequence<br>
> >> <br>
> "vertices_tmp_id_seq" for serial column<br>
> "<a href="http://vertices_tmp.id" target="_blank">vertices_tmp.id</a><br>
> >> <<a href="http://vertices_tmp.id" target="_blank">http://vertices_tmp.id</a>>"<br>
> >> <br>
> CONTEXT: SQL statement "CREATE TABLE<br>
> vertices_tmp (id serial)"<br>
> >> PL/pgSQL<br>
> function "assign_vertex_id" line 14 at EXECUTE statement<br>
> >> ERROR: <br>
> find_srid() - couldnt find the corresponding SRID - is<br>
> >> the geometry<br>
> registered in the GEOMETRY_COLUMNS table? Is<br>
> >> there an<br>
> uppercase/lowercase missmatch?<br>
> >> <br>
> CONTEXT: PL/pgSQL function<br>
> "assign_vertex_id" line 20 at<br>
> >> assignment<br>
> >><br>
> >> **********<br>
> Error **********<br>
> >><br>
> >> ERROR:<br>
> find_srid() - couldnt find the corresponding SRID - is<br>
> >> the geometry<br>
> registered in the GEOMETRY_COLUMNS table? Is<br>
> >> there an<br>
> uppercase/lowercase missmatch?<br>
> >> SQL state:<br>
> P0001<br>
> >> Context:<br>
> PL/pgSQL function "assign_vertex_id" line 20 at<br>
> >> assignment<br>
> >><br>
> >> Any help<br>
> would be really appreciated.<br>
> >><br>
> >> Regards<br>
> >> Stephanos<br>
> Charalambous<br>
> >><br>
> >><br>
> >> <br>
> _______________________________________________<br>
> >> <br>
> pgrouting-dev mailing list<br>
> >> <br>
> <mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>><a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> >> <br>
> <mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>><br>
> >> <<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a>><a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
> >><br>
> >><br>
> >><br>
> >><br>
> >> --<br>
> >> Georepublic UG &<br>
> Georepublic Japan<br>
> >> eMail:<br>
> >> <mailto:<a href="mailto:daniel.kastl@georepublic.de">daniel.kastl@georepublic.de</a>><a href="mailto:daniel.kastl@georepublic.de">daniel.kastl@georepublic.de</a><br>
> >> <mailto:<a href="mailto:daniel.kastl@georepublic.de">daniel.kastl@georepublic.de</a>><br>
> >> Web: <<a href="http://georepublic.de/" target="_blank">http://georepublic.de/</a>><a href="http://georepublic.de" target="_blank">http://georepublic.de</a><br>
> >> <br>
> _______________________________________________<br>
> >> pgrouting-dev mailing<br>
> list<br>
> >> <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> <mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>><br>
> >> <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
> ><br>
> > <br>
> _______________________________________________<br>
> > pgrouting-dev mailing list<br>
> > <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> <mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>><br>
> > <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Georepublic UG & Georepublic Japan<br>
> > eMail: <a href="mailto:daniel.kastl@georepublic.de">daniel.kastl@georepublic.de</a><br>
> <mailto:<a href="mailto:daniel.kastl@georepublic.de">daniel.kastl@georepublic.de</a>><br>
> > Web: <a href="http://georepublic.de" target="_blank">http://georepublic.de</a> <<a href="http://georepublic.de/" target="_blank">http://georepublic.de/</a>><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > pgrouting-dev mailing list<br>
> > <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> > <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
><br>
> _______________________________________________<br>
> pgrouting-dev mailing list<br>
> <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
><br>
<br>
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>