On Tue, Aug 4, 2009 at 8:11 AM, Maxime Guillaud <m...@mguillaud.net> wrote:

> Hi all,
>
> shape-decode has been crashing on me for a certain shapefile and I can
> not figure out why. I am using terragear-cs downloaded today from the
> GIT repository. The rest of the toolchain runs fine.
>
> shape-decode runs for a while and stops with the following error:
>
> [...]
> distance = 239.828
> 0.623843, 46.9914, 0
> distance = 7.99999
> 0.626076, 46.9898, 0
>  min = -2930.42, -592.671, 200 max = 0.62615, 46.997, -200
>  Bucket min = -180:0, -593:2


A bucket coordinate of -593:2 suggests that this shapefile may contain some
bogus data. (or there could be a bug leading up to this) but I believe the
portion prior to the ":" represents a whole degree coordinate of the bucket,
so this should range from -180 to +179 for latitude and -90 to +89 for
longitude.  -593 is completely outside of possible reality.  So the question
is, is this a problem with the shapefile data, or some problem processing
the data in the shape-decode code.

Regards,

Curt.



>  Bucket max = 0:2, 46:7
>  polygon spans tile boundaries
>  dx = 722  dy = 5117
> terminate called after throwing an instance of 'sg_exception'
> Aborted
>
>
> A run under gdb yielded the following:
>
> (gdb) run --max-segment 500 --line-width 6
>
> /storage1/flightgear/scenery-dev/terrain/custom_road_rail_from_OSM/france/fg_railways
>
> Railroad  Railroad > log 2> log2
> Starting program:
>
> /storage1/flightgear/scenery-dev/terragear/install/terragear-cs/bin/shape-decode
>
> --max-segment 500 --line-width 6
>
> /storage1/flightgear/scenery-dev/terrain/custom_road_rail_from_OSM/france/fg_railways
>
> Railroad  Railroad > log 2> log2
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7f866f54b6f0 (LWP 10926)]
>
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 0x7f866f54b6f0 (LWP 10926)]
> 0x00007f866e447015 in raise () from /lib/libc.so.6
>
> (gdb) bt
> #0  0x00007f866e447015 in raise () from /lib/libc.so.6
> #1  0x00007f866e448b83 in abort () from /lib/libc.so.6
> #2  0x00007f866ecebf94 in __gnu_cxx::__verbose_terminate_handler () from
> /usr/lib/libstdc++.so.6
> #3  0x00007f866ecea396 in ?? () from /usr/lib/libstdc++.so.6
> #4  0x00007f866ecea3c3 in std::terminate () from /usr/lib/libstdc++.so.6
> #5  0x00007f866ecea4aa in __cxa_throw () from /usr/lib/libstdc++.so.6
> #6  0x000000000041175a in tgChopNormalPolygon (pa...@0x7fff7756f220,
> poly_ty...@0x7fff7756f130, sha...@0x7fff7756eda0, preserve3d=false) at
> chop-bin.cxx:222
> #7  0x0000000000405b50 in processLine (psShape=0x202d870,
> work_d...@0x7fff7756f220, poly_ty...@0x7fff7756f130, linewidth=6) at
> shape-decode.cxx:545
> #8  0x000000000040a5f1 in main (argc=4, argv=0x7fff7756f3c8) at
> shape-decode.cxx:920
> (gdb) list *0x000000000041175a
> 0x41175a is in tgChopNormalPolygon(std::string const&, std::string
> const&, TGPolygon const&, bool) (chop-bin.cxx:208).
> 203         SG_LOG( SG_GENERAL, SG_DEBUG, "  Bucket min = " << b_min );
> 204         SG_LOG( SG_GENERAL, SG_DEBUG, "  Bucket max = " << b_max );
> 205
> 206         if ( b_min == b_max ) {
> 207             // shape entirely contained in a single bucket, write
> and bail
> 208             clip_and_write_poly( path, index, poly_type, b_min,
> shape, preserve3d );
> 209             return;
> 210         }
> 211
> 212         SGBucket b_cur;
>
>
> This happens with the following shapefile:
> http://www.mguillaud.net/fg/fg_railways.tgz
> Note that I can run some other shapefiles through shape-decode without
> problem. That particular file was generated by PostGIS using  pgsql2shp.
> It does not appear to be invalid.
>
> Any advice ?
> Regards,
> Maxime
>
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>



-- 
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to