Search code examples
mapsshapefilegeogeotools

Problem in Shapefiles


i need a help i have a shape file that continue 3716 polygon record and want to draw this shape file where some of those polygons need to have a specified color

OR WANT a search technique to search this map for a point (lat-long) and get it's belong polygon but not by searching all polygons

i tries all, OpenJump-Source code, GeoTools,....


Solution

  • In GeoTools you can follow the Style tutorial to show you how to display your shapefile. There is no way to carry out a point in polygon search without at least examining the bounding box of each polygon but the GeoTools Query Lab will talk you through the basics of setting up a query (and if your shapefile has a spatial index then it will be quick enough).