![]() ![]() From this I could determine which one was closest. I used these geometries in order to calculate the distance from the original lat/long to the nearest point on each returned polygon. I took it one step further and requested geometries back from the query. To_3395 = partial_projection('epsg:3395', 'epsg:6318')Ĭoordinate_map = mapping(transform(to_3395, buffered_point))Ĭoords = coordinate_map # which is the coordinate system that is used our ArcGIS Feature Classes # Project the buffered point (now Polygon) back to a GeoDetic Coordinate System, planarīuffer_area = (miles * 1609.34) * (1 / cos(radians(latitude)))īuffered_point = projected_point.buffer(buffer_area, 32) # We provide an additional buffer to accomodate for difference in geodetic vs. # Calculation: Convert Miles to Meters, Multiplied by 1 * the Cos(Latitude) Projected_point = transform(to_6318, point) # Project the inputted Point to Planar Coordinate System before buffering from shapely.geometry import Point, Polygon, LinearRing, mappingĭef partial_projection(from_wkid, to_wkid): ![]() This returned all polygons that my polygon intersected. From this, I was able to create a dictionary and passed the coordinates key into the Identify function of the Map Service. Once I was done, I retransformed the resulting Polygon into a geodetic system (NAD 1983 (2011)). Once that was done, I was free to use Shapely to buffer the Point with X meters (I converted to miles). Map Services get fundamentally changed, which breaks the SoE, which prevents us from upgrading.ĭiscovered the answer using Shapely and PyProj.Įssentially what I needed to do was transform the input lat/long into a coordinate system with a unit of measurement in meters. I'm worried that adding in an SoE could cause blocking on future update for ArcGIS Server. I was told by ESRI (am waiting on a link) that there is an SoE that allows for a "Find Nearest" type function. I feel like this wouldn't be the best route to go. However, I'm not sure I like this given that it's based upon Pixel tolerance (I understand why). I have tried using the "Tolerance" parameter. What are some good methods for calculating the geometry needed for a Polygon Circle, given the Lat/Long, to be used in the Map Service Identify function? ![]() They basically care whether or not the Point falls within, or near, a given boundary. I understand that this could lead to returning multiple results, but the users are fine with this. If there is an intersection, return that boundary. My thinking was to have them pass in the geometry for this Polygon Circle, rather than passing in the Point. In cases like this, I was thinking of having the user calculate a Polygon Circle with X distance (X determined by their specific function, but let's say 5 miles) based upon their Lat/Long. If the Point is X distance away from a boundary, the users would still like it to be returned. We've found cases where some points of data are falling outside of all boundaries. Currently they are using the ArcGIS Identify operation to do this procedure. Users query this Map Service with a lat/long to determine whether or not a Point falls within a Boundary. I have a Map Service that is currently just multiple boundary layers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |