[Jts-topo-suite-user] Point inside polygon (geo fence)
Brought to you by:
dr_jts
From: Imóveis N. <imo...@gm...> - 2012-05-22 00:00:11
|
I all, my first contact with JTS Topology Suite Please, I would like to execute the following client side code with similar code at server side, probably using JTS Topology Suite. Please, can you help me on this? My server side technology is servlets. I have a polygon and a point. I would like to find out if point is inside polygon or not. Here is the client side (openlayers) code: var lat=1.852; //in meters var longi=111.120 //in meters var p = new OpenLayers.Geometry.Point(longi, lat); ... if(map.layers[1].features[0].geometry.containsPoint && map.layers[1].features[0].geometry.containsPoint(p)) { alert('yes, point contained'); } else { alert('no, point not contained or containsPoint-method not defined'); } How to do the same with JTS Topology Suite? Thanks a lot Alex |