[pgrouting-users] pgRouting could not get result on Windows7

sittichai choosumrong sittichai.ocu at gmail.com
Fri Aug 8 05:40:37 PDT 2014


Hi Daniel and all list,

Again problem. I downloaded OSM data and save as shapefile using projection
EPSG:3857.
I try to use many data but I still could not get result.

Actually, pgRouting can run on Windows7 but the problem is when I implement
the road network data.

I just realise after I test with the same data in difference OS (Ubuntu,
Windows8 and Windows7)
Ubuntu and Windows8 is work well but the problem is;
On Windows7, the system cannot get the correct topology after use command

 'SELECT pgr_createTopology('ways', 0.00001, 'the_geom', 'gid');'

You can see how its strange in the image files in this mail.

With the same data, 'topo_correct.jpg' showing the topology node which
created on Window8 and we get the node for all junction which have only one
ID values.
But, 'topo_error.jpg'  showing the topology node which created on Windows7
and in one node its have ID values depend on how much edge connect on that
node.

I think because of the problem that why when I use pgRouting function I got
only empty table without any error of calculating.

Any ideas?

Best regards,
Bomp






On Thu, Aug 7, 2014 at 3:37 PM, sittichai choosumrong <
sittichai.ocu at gmail.com> wrote:

> Hi Daniel,
>
> Now it work!! Thank you. The problem is from my data because the geometry
> is "multilinestring"
> I have to change to "linestring"
>
> Best regards,
> Bomp
>
> P.S. If you need any help about pgRouting workshop on FOSS4G-ASIA in
> Thailand this years (
> http://www.foss4g-asia.org/2014/programmenu/workshops/), please feel free
> to tell me what can I help you?
>
>
> On Thu, Aug 7, 2014 at 3:25 PM, Daniel Kastl <daniel at georepublic.de>
> wrote:
>
>> Hi Bomp,
>>
>> Because you mention "Windows 7" in the subject, do you want to say that
>> it worked before, for example on Linux?
>>
>> If you use the sample data of the documentation [1], does it return an
>> empty table as well? You can run the sample queries [2] to verify it works
>> or not.
>>
>> If the sample queries with the sample data work, then you may have a
>> problem with your data.
>>
>> Just one remark (which shouldn't prevent you from running pgr_dijkstra
>> though): your geometry is "multilinestring". If you really have
>> multilinestrings, then you would have a problem to define source and
>> target. Otherwise just make it ordinary linestrings.
>>
>> Best regards,
>> Daniel
>>
>>
>>
>>
>>
>> [1]
>> http://docs.pgrouting.org/2.0/en/doc/src/developer/sampledata.html#sampledata
>> [2] http://docs.pgrouting.org/2.0/en/src/dijkstra/doc/index.html#examples
>>
>>
>>
>>
>>
>> On Thu, Aug 7, 2014 at 10:07 AM, sittichai choosumrong <
>> sittichai.ocu at gmail.com> wrote:
>>
>>> Dear all,
>>>
>>> I has implemented and install PostgreSQL/PostGIS and pgRouting on
>>> windows 7 as showing the detail of version belows;
>>>
>>> PostgreSQL = "PostgreSQL 9.3.5, compiled by Visual C++ build 1600,
>>> 32-bit"
>>> PostGIS = "POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3924"
>>> PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24"
>>> LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER"
>>> pgRouting ="(2.0.0,pgrouting-2.0.0,0,d6ed2cb,master,1.46.1)"
>>>
>>> After I create all needed column into my road table then use
>>> pgr_dijkstra() function. But I could not get the routing result. The table
>>> showing empty data.
>>>
>>> ### My road data structure is showing below;
>>>
>>> -- Table: public.ways
>>>
>>> -- DROP TABLE public.ways;
>>>
>>> CREATE TABLE public.ways
>>> (
>>>   gid integer NOT NULL DEFAULT nextval('ways_gid_seq'::regclass),
>>>   the_geom geometry(MultiLineString,3857),
>>>   source integer,
>>>   target integer,
>>>   reverse_cost double precision,
>>>   length double precision,
>>>   x1 double precision,
>>>   y1 double precision,
>>>   x2 double precision,
>>>   y2 double precision,
>>>   CONSTRAINT ways_pkey PRIMARY KEY (gid)
>>> )
>>> WITH (
>>>   OIDS=FALSE
>>> );
>>> ALTER TABLE public.ways
>>>   OWNER TO postgres;
>>>
>>> -- Index: public.source_idx
>>>
>>> -- DROP INDEX public.source_idx;
>>>
>>> CREATE INDEX source_idx
>>>   ON public.ways
>>>   USING btree
>>>   (source);
>>>
>>> -- Index: public.target_idx
>>>
>>> -- DROP INDEX public.target_idx;
>>>
>>> CREATE INDEX target_idx
>>>   ON public.ways
>>>   USING btree
>>>   (target);
>>>
>>> -- Index: public.ways_geom_gist
>>>
>>> -- DROP INDEX public.ways_geom_gist;
>>>
>>> CREATE INDEX ways_geom_gist
>>>   ON public.ways
>>>   USING gist
>>>   (the_geom);
>>>
>>> -- Index: public.ways_source_idx
>>>
>>> -- DROP INDEX public.ways_source_idx;
>>>
>>> CREATE INDEX ways_source_idx
>>>   ON public.ways
>>>   USING btree
>>>   (source);
>>>
>>> -- Index: public.ways_target_idx
>>>
>>> -- DROP INDEX public.ways_target_idx;
>>>
>>> CREATE INDEX ways_target_idx
>>>   ON public.ways
>>>   USING btree
>>>   (target);
>>>
>>>
>>>
>>>
>>> What I am missing, any ideas?
>>>
>>> Bomp
>>> --
>>> ■□■□■□■□■□■□■□■□■
>>> Sittichai Choosumrong (Ph.D)
>>> Lecturer at Faculty of Agriculture, Natural Resources and Environment,
>>> Department of Natural Resources and Environment,
>>> Geography
>>> 99 Moo 9 Tambon Tha Pho,
>>> Amphoe Muang
>>> Phitsanulok Thailand 65000
>>> Office: +66 55 962753
>>> Mobile: +66 95-635-8102
>>> email: sittichaic at nu.ac.th
>>> ■□■□■□■□■□■□■□■□■
>>>
>>> _______________________________________________
>>> Pgrouting-users mailing list
>>> Pgrouting-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>
>>
>>
>>
>> --
>> Georepublic UG & Georepublic Japan
>> eMail: daniel.kastl at georepublic.de
>> Web: http://georepublic.info
>>
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>
>
>
>
> --
> ■□■□■□■□■□■□■□■□■
> Sittichai Choosumrong (Ph.D)
> Lecturer at Faculty of Agriculture, Natural Resources and Environment,
> Department of Natural Resources and Environment,
> Geography
> 99 Moo 9 Tambon Tha Pho,
> Amphoe Muang
> Phitsanulok Thailand 65000
> Office: +66 55 962753
> Mobile: +66 95-635-8102
> email: sittichaic at nu.ac.th
> ■□■□■□■□■□■□■□■□■
>



-- 
■□■□■□■□■□■□■□■□■
Sittichai Choosumrong (Ph.D)
Lecturer at Faculty of Agriculture, Natural Resources and Environment,
Department of Natural Resources and Environment,
Geography
99 Moo 9 Tambon Tha Pho,
Amphoe Muang
Phitsanulok Thailand 65000
Office: +66 55 962753
Mobile: +66 95-635-8102
email: sittichaic at nu.ac.th
■□■□■□■□■□■□■□■□■
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20140808/05ed9fef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topo_correct.jpg
Type: image/jpeg
Size: 46476 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20140808/05ed9fef/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topo_error.jpg
Type: image/jpeg
Size: 113617 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20140808/05ed9fef/attachment-0003.jpg>


More information about the Pgrouting-users mailing list