Query shapefiles for the administrative area of a lat/lng
I have the all the shapefiles (shp, dbf, ...) for my country's counties. I have a list of points (开发者_如何转开发latitude/longitude) and need to reference each point with corresponding county.
I have looked into these tools and libraries. They can read, write and edit SHP files, but don't seem to be able to search stuff on them. I have converted the DBF file into MySQL (using this) but this data is just meta-data, not the actual polygons.
Do we need to convert SHP geometry units to lat/lng? Is there any tool/lib/package to do it? Rather new to geo-stuff. ;)
thanks! cheers
The shape file defines some vectorized two dimensional area(s). Once you have the file loaded, the problem is one of simple geometry. You will need to use some generic geometry library (or custom code) to determine whether a particular point falls within the defined shapes.
精彩评论