0

A map in ArcMap contains two datasets:

  1. Points J_i from table Jurisdiction of an SQL-database (SQL Server 2017) displayed by Display XY Data (Data Type: XY Event Source)
  2. Polygon shapefile feature Districts with polygons for districts

The table Jurisdiction contains column District which tells within which district polygon a specific point J_i is expected to be located. How can I identify points J_i, which are not located within the district polygon as suggested by column District? A goal would be to make those points visible.

Adding a field with field calculation in table Jurisdiction ist not applicable as Jurisdiction has a database connection. Other approaches I know from the toolbox produce static results. The approach should dynamically react to modified entries in Jurisdiction as Jurisdiction experiences ongoing editing.

Only show points with mismatch.

4
  • 1
    Your problem statement is quite terse; using descriptive names (more than one character) and a diagram or three might make your process clearer. I doubt you can detect remote activity in a passive map application. A proper Query Layer might be of more use than a cached event layer.
    – Vince
    Mar 19 '20 at 11:29
  • 1
    Spatial Join would allow you to select features where they belong. This could of course be done completely within SQL, if the database supports spatial queries (you could even have a trigger to correct the encoding and add a log record on insert).
    – Vince
    Mar 19 '20 at 15:46
  • @Vince: please give your answer as a full answer instead of a comment so I can mark it as an accepted answer. I was successful by integrating both point and polygon features as point and polygon geometries into SQL, creating a View combined with a Scalar-valued-Function and by displaying the View in any GIS-application.
    – stonebe
    Mar 29 '20 at 9:52
  • Sorry, too busy with COVID-19 support to fashion a proper answer. Feel free to self-answer, though the question doesn't mention which database (to make it answerable).
    – Vince
    Mar 29 '20 at 11:32
0

Answer as derived from Vince's suggestion:

  1. In database, create tables Jurisdiction and District with columns J_POINT of Point Geometry Data Type (geometry::Point) and D_POLYGON of Polygon Geometry Data Type (geometry::Polygon) respectively [see image]
  2. Create View Mismatch with condition:

SELECT J.J_POINT
FROM dbo.Jurisdiction AS J INNER JOIN
dbo.District AS D ON J.J_POINT.STWithin(D.D_POLYGON) = 1 AND J.J_DISTRICT <> D.D_NAME
  1. Plot result from View Mismatch in GIS

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.