<br><br>Hello, <br><br>I have a class as  following . As i have notice Class LineString is derived from Geometry Class but when I am trying assing LineSegment  object reference to a Geometry pointer , I am getting an error like <br>
<br><b>cannot convert ‘geos::geom::LineString*’ to ‘geos::geom::Geometry*’ in assignment</b><br><br>Can you please help me in this regard.<br> <br clear="all">class Position : public SimplePointInAreaLocator  //SimplePointInAreaLocator is class in algorithm/locator<br>
{<br>private:<br>    Geometry *_geom;<br>public:<br><br>    Position(Geometry *g):SimplePointInAreaLocator(g),_geom(g)<br>    {}<br><br>    Position(LineSegment ls):SimplePointInAreaLocator(NULL),_geom(NULL){<br>        GeometryFactory *_factory;<br>
        CoordinateSequence *cl = new CoordinateArraySequence();<br>        cl-&gt;add(ls.p0);<br>        cl-&gt;add(ls.p1);<br>        _geom = _factory-&gt;createLineString(cl);  //AT THIS LINE I AM GETTING ERROR<br><br><br>
    }<br>    void setGeometry(Geometry *g){_geom = g;}<br><br>    bool calculate(const Coordinate &amp;p){<br>        return locate(p,_geom);<br>    }<br><br><br>};<br><br><br><br>Thanks &amp; Regards,<br>Debabrata Bardhan<br>