[geos-devel] Getting Parse Exception

Sandro Santilli strk at keybit.net
Wed Jul 10 13:47:33 PDT 2013


On Thu, Jul 11, 2013 at 01:45:51AM +0530, vishal tiwari wrote:
> I am referring ParseException: Expected number but encoundered ','''. This
> error comes when i run my test case.

Your testcase is using an invalid WKT, so the error is correct.
Please fully read my first reply. --strk;

> 
> My second problem i as:
> - mytest.cpp:(.text+0xf): undefined reference to
> > > > `geos::io::WKTReader::WKTReader()'
> 
> This error comes when i try to use any geos header files, in some other
> program.
> 
> 
> 
> On 11 July 2013 01:38, Sandro Santilli <strk at keybit.net> wrote:
> 
> > On Thu, Jul 11, 2013 at 01:35:28AM +0530, vishal tiwari wrote:
> > > I have already added VoronoiTest.cpp in tests/unit/Makefile.am , and run
> > > autogen and configure. Still i am facing the same problem.
> >
> > The problem you reported was:
> >
> > > > > - mytest.cpp:(.text+0xf): undefined reference to
> > > > > `geos::io::WKTReader::WKTReader()'
> >
> > Which doesn't seem like coming from a `make geos_unit`.
> >
> > Or are you referring to:
> >
> > > "ParseException: Expected number but encountered ','"
> >
> > --strk;
> >
> > >
> > >
> > > On 11 July 2013 01:30, Sandro Santilli <strk at keybit.net> wrote:
> > >
> > > > On Thu, Jul 11, 2013 at 12:59:05AM +0530, vishal tiwari wrote:
> > > > > I was making test case for VoronoiDiagramBuilder [1] , but got this
> > > > > following exception:
> > > > >    group: geos::triangulate::Voronoi, test: test<1>
> > > > >    problem: unexpected exception
> > > > >    exception typeid: N4geos2io14ParseExceptionE
> > > > >    message: "ParseException: Expected number but encountered ','"
> > > > >
> > > > > Is it not able to parse the string data that i have passed? Or the
> > error
> > > > in
> > > > > the implementation of VoronoiDiagram? If its not in the
> > VoronoiDiagram
> > > > > code, then how do i fix it?
> > > > > [1]
> > > > >
> > > >
> > https://github.com/vishaltiwari/libgeos/blob/svn-trunk/tests/unit/triangulate/VoronoiTest.cpp
> > > >
> > > > It is unable to parse the string data you have passed.
> > > > Indeed you're using a comma between X and Y ordinate values of each
> > point
> > > > in the MULTIPOINT geometry.
> > > >
> > > > > Also, i was trying to use the C++ wrapper, directly in order to test
> > my
> > > > > code, in some "file.cpp", and after including the necessary header
> > > > files, i
> > > > > am getting errors like:
> > > > >
> > > > > - mytest.cpp:(.text+0xf): undefined reference to
> > > > > `geos::io::WKTReader::WKTReader()'
> > > > >
> > > > > - mytest.cpp:(.text+0x58): undefined reference to
> > > > > `geos::io::WKTReader::read(std::basic_string<char,
> > > > std::char_traits<char>,
> > > > > std::allocator<char> > const&)'
> > > > >
> > > > > I think this might be some linkage problem or something like that.
> > How
> > > > do i
> > > > > directly use the header files that are defined.
> > > >
> > > > You need to add "VoronoiTest.cpp" to tests/unit/Makefile.am
> > > > then run ./autogen.sh from the top-level dir and ./configure again.
> > > > Then you build with:
> > > >
> > > >   cd tests/unit
> > > >   make geos_unit
> > > >
> > > > --strk;
> > > >
> > >
> > >
> > >
> > > --
> > > Vishal Tiwari
> > > Undergraduate
> > > Computer Science and Engineering
> > > Lab for Spatial Informatics
> > > IIIT-Hyderabad
> >
> > > _______________________________________________
> > > geos-devel mailing list
> > > geos-devel at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/geos-devel
> >
> >
> > --
> >
> >  http://www.cartodb.com - Map, analyze and build applications with your
> > data
> >
> >                                        ~~ http://strk.keybit.net
> >
> >
> 
> 
> -- 
> Vishal Tiwari
> Undergraduate
> Computer Science and Engineering
> Lab for Spatial Informatics
> IIIT-Hyderabad

> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel


-- 

 http://www.cartodb.com - Map, analyze and build applications with your data

                                       ~~ http://strk.keybit.net 



More information about the geos-devel mailing list