1

Is it possible to export the boundaries of one layer, as well as the latitude and longitude falling within each boundary, from a program/by programming?

I seem to have gotten fairly close to a solution in QGIS but I am completely new.

Rather than bringing the subset of X,Y coordinates to the software and running an intersect, I believe it could be possible to transform the polygon into points, then intersect given points with the polygons with the points being an attribute of individual parts.

Would this be possible?

While I'm able to export all the points making up a shape file/boundaries -> points/lines, etc., I seem to not be able to extract the exact x and y for each polygon combined with where points fall within them.

Ideally, I'd like to implement this in Microsoft/T-SQL using the extracted data (but this would be after the fact).

I have so far from QGIS been able to extract centroids and transform the polygon into points.

I have been trying to use v.distance to calculate the distance from centroids to the boundaries in the polygon but I'm not sure if this is even close to what I want.

From further reading, I am not as far along as I believed. I think I have to find a way to import the shapefile into SQL - so any tips there would be appeciated. I have shape_length/shape_area, but I'm unsure how that helps me.

  • This is easy with MS SQL Server and the STIntersects function... are you using SQL Server? – DPSSpatial Jun 10 at 19:38
  • Yes sir! I'm just completely new to the geography/geometry datatypes. – Raymond Johnson Jun 10 at 20:04
  • Welcome to GIS SE. As a new user, please be sure to take the short tour to learn about this site's focused Q&A format. You mentioned that you were close to a solution. Please edit your question to include detail about that attempt and where it fell short, including the text of any error messages. – Andy Jun 10 at 20:05
  • I believe my next question/step is to determine how to move from a field containing 'Shape_area,' 'shape_length'/a polygon file to something SQL can work with. – Raymond Johnson Jun 10 at 20:06
  • Thank you for your answers. – Raymond Johnson Jun 10 at 20:10

Your Answer

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

Browse other questions tagged or ask your own question.