## geotools-gt2-users

 [Geotools-gt2-users] Public GMS & SHP data resources. From: Jan Goyvaerts - 2008-07-24 08:13:19 Attachments: Message as HTML ```Hello Geotools Users, For a totally private and non-commercial matter I'm in need of some basic gis data in shp and/or gml format. I've been trying to find public resources with Google but I didn't manage to find it. (Probably not using the right key words.) Is there anyone in this email who can point me to such resources ? Many thanks indeed ! Regards, Jan ```
 [Geotools-gt2-users] Does the point fall within polygon bounds? From: Christian Weaves - 2008-07-24 09:34:44 ```Hi there, a noobie question if you don't mind, I have spent some time reading the faq's but couldn't find the answer... Say I have a polygon and a point, is there a way of determining if the point falls within the bounds of the polygon boundaries? Thank you v.much! Here's what I have so far: GeometryFactory geomFac = new GeometryFactory(); //create polygon Coordinate[] polygonCoordinates = new Coordinate[10]; polygonCoordinates[0] = new Coordinate(7,7); polygonCoordinates[1] = new Coordinate(6,9); polygonCoordinates[2] = new Coordinate(6,11); polygonCoordinates[3] = new Coordinate(7,12); polygonCoordinates[7] = new Coordinate(13,9); polygonCoordinates[8] = new Coordinate(11,7); polygonCoordinates[9] = new Coordinate(7,7); LinearRing ring = geomFac.createLinearRing(polygonCoordinates); Polygon polygon = geomFac.createPolygon(ring,null); //create point Coordinate c = new Coordinate(14.0d,14.0d); Point point = geomFac.createPoint(c); //code to check if point falls within polygon!? --- Fugro Data Solutions Limited Tyn y Coed Llanrhos Llandudno North Wales LL30 1SA United Kingdom Tel: +44 (0)1492 563555 Fax: +44 (0)1492 592030 General Email: info@... Website: http://www.fugro-data.com This email and any attachments are confidential. They may contain privileged information and are intended for the named addressee(s) only. They must not be distributed without our consent. If you are not the intended recipient, please notify us immediately and do not disclose, distribute, or retain this email or any part of it. Unless expressly stated, opinions in this email are those of the individual sender, and not of Fugro Data Solutions Ltd. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. Fugro Data Solutions Ltd and its subsidiaries may monitor email traffic data and also the content of email for the purposes of security. This email is not intended to create legal relations. Fugro Data Solutions Limited is a limited company registered in England and Wales (Reg No. 5583527) at Tyn y Coed, Pentywyn Road, Llanrhos, Llandudno, LL30 1SA. VAT No. GB901440962. ```
 Re: [Geotools-gt2-users] Does the point fall within polygon bounds? From: Adrian Custer - 2008-07-24 09:46:24 ```JTS uses the half-line intersection method: com.vividsolutions.jts.algorithm.RayCrossingCounter --adrian On Thu, 2008-07-24 at 10:30 +0100, Christian Weaves wrote: > Hi there, a noobie question if you don't mind, I have spent some time > reading the faq's but couldn't find the answer... > > Say I have a polygon and a point, is there a way of determining if the > point falls within the bounds of the polygon boundaries? > > Thank you v.much! > > Here's what I have so far: > > GeometryFactory geomFac = new GeometryFactory(); > > //create polygon > Coordinate[] polygonCoordinates = new Coordinate[10]; > polygonCoordinates[0] = new Coordinate(7,7); > polygonCoordinates[1] = new Coordinate(6,9); > polygonCoordinates[2] = new Coordinate(6,11); > polygonCoordinates[3] = new Coordinate(7,12); > polygonCoordinates[7] = new Coordinate(13,9); > polygonCoordinates[8] = new Coordinate(11,7); > polygonCoordinates[9] = new Coordinate(7,7); > > LinearRing ring = geomFac.createLinearRing(polygonCoordinates); > Polygon polygon = geomFac.createPolygon(ring,null); > > > //create point > Coordinate c = new Coordinate(14.0d,14.0d); > Point point = geomFac.createPoint(c); > > //code to check if point falls within polygon!? > > > > > --- > > Fugro Data Solutions Limited > Tyn y Coed > Llanrhos > Llandudno > North Wales > LL30 1SA > United Kingdom > > Tel: +44 (0)1492 563555 > Fax: +44 (0)1492 592030 > > General Email: info@... > > Website: http://www.fugro-data.com > > This email and any attachments are confidential. They may > contain privileged information and are intended for the named > addressee(s) only. They must not be distributed without our > consent. If you are not the intended recipient, please notify us > immediately and do not disclose, distribute, or retain this > email or any part of it. Unless expressly stated, opinions in > this email are those of the individual sender, and not of Fugro > Data Solutions Ltd. We believe but do not warrant that this > e-mail and any attachments are virus free. You must therefore > take full responsibility for virus checking. Fugro Data > Solutions Ltd and its subsidiaries may monitor email traffic > data and also the content of email for the purposes of security. > This email is not intended to create legal relations. > > Fugro Data Solutions Limited is a limited company registered in > England and Wales (Reg No. 5583527) at Tyn y Coed, Pentywyn Road, > Llanrhos, Llandudno, LL30 1SA. VAT No. GB901440962. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ```
 Re: [Geotools-gt2-users] Does the point fall within polygon bounds? From: Steve Ansari - 2008-07-24 13:40:56 Attachments: Message as HTML ```I think you can just do this: if (point.within(polygon)) { // yes, within } Point and Polygon are both children of the Geometry class which contains methods for intersects, contains, within, distance of, etc... Steve Adrian Custer said the following on 7/24/2008 5:46 AM: > JTS uses the half-line intersection method: > com.vividsolutions.jts.algorithm.RayCrossingCounter > > --adrian > > > On Thu, 2008-07-24 at 10:30 +0100, Christian Weaves wrote: > >> Hi there, a noobie question if you don't mind, I have spent some time >> reading the faq's but couldn't find the answer... >> >> Say I have a polygon and a point, is there a way of determining if the >> point falls within the bounds of the polygon boundaries? >> >> Thank you v.much! >> >> Here's what I have so far: >> >> GeometryFactory geomFac = new GeometryFactory(); >> >> //create polygon >> Coordinate[] polygonCoordinates = new Coordinate[10]; >> polygonCoordinates[0] = new Coordinate(7,7); >> polygonCoordinates[1] = new Coordinate(6,9); >> polygonCoordinates[2] = new Coordinate(6,11); >> polygonCoordinates[3] = new Coordinate(7,12); >> polygonCoordinates[7] = new Coordinate(13,9); >> polygonCoordinates[8] = new Coordinate(11,7); >> polygonCoordinates[9] = new Coordinate(7,7); >> >> LinearRing ring = geomFac.createLinearRing(polygonCoordinates); >> Polygon polygon = geomFac.createPolygon(ring,null); >> >> >> //create point >> Coordinate c = new Coordinate(14.0d,14.0d); >> Point point = geomFac.createPoint(c); >> >> //code to check if point falls within polygon!? >> >> >> >> >> --- >> >> Fugro Data Solutions Limited >> Tyn y Coed >> Llanrhos >> Llandudno >> North Wales >> LL30 1SA >> United Kingdom >> >> Tel: +44 (0)1492 563555 >> Fax: +44 (0)1492 592030 >> >> General Email: info@... >> >> Website: http://www.fugro-data.com >> >> This email and any attachments are confidential. They may >> contain privileged information and are intended for the named >> addressee(s) only. They must not be distributed without our >> consent. If you are not the intended recipient, please notify us >> immediately and do not disclose, distribute, or retain this >> email or any part of it. Unless expressly stated, opinions in >> this email are those of the individual sender, and not of Fugro >> Data Solutions Ltd. We believe but do not warrant that this >> e-mail and any attachments are virus free. You must therefore >> take full responsibility for virus checking. Fugro Data >> Solutions Ltd and its subsidiaries may monitor email traffic >> data and also the content of email for the purposes of security. >> This email is not intended to create legal relations. >> >> Fugro Data Solutions Limited is a limited company registered in >> England and Wales (Reg No. 5583527) at Tyn y Coed, Pentywyn Road, >> Llanrhos, Llandudno, LL30 1SA. VAT No. GB901440962. >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Geotools-gt2-users mailing list >> Geotools-gt2-users@... >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ```
 Re: [Geotools-gt2-users] Public GMS & SHP data resources. From: Michael Bedward - 2008-07-25 00:45:52 ```Hi Jan, If you're just after shapefiles for test purposes you can find some here... http://www.shpconnection.com/ Michael 2008/7/24 Jan Goyvaerts : > Hello Geotools Users, > > For a totally private and non-commercial matter I'm in need of some basic > gis data in shp and/or gml format. I've been trying to find public resources > with Google but I didn't manage to find it. (Probably not using the right > key words.) > > Is there anyone in this email who can point me to such resources ? Many > thanks indeed ! > > Regards, > > Jan > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > ```