Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am a novice MapInfo user, with a basic to moderate knowledge of queries and SQL. My work entails doing risk assessments for shipping traffic based on AIS-tracks (radio-based vessel information system), which are represented as polylines in the dataset. However, some of the polylines are broken, due to missing AIS-coverage. I use several datasets, each of which have different places with broken tracks, and would like some way to quantify the deficiencies of each, as to make it easier to decide which dataset is best for a given location.

I am wondering is if it is possible to use MapInfo to calculate what percentage of polylines enter an area (in this case a 1X1 nautical mile box in a grid of Europe) but does not exit the box afterwards, and then give that box a given color based on the percentage.

Any ideas or input in regards to this would be greatly appreciated. If this question falls into the "RTFF", "RTFM" or similar, my apologies in advance.

share|improve this question
add comment

1 Answer 1

Everything is about reading the manual, Jørgen, sometimes it's just not that easy to find :-)

This query should give you an idea of the way to move a head:

Select VectorGrid.ID
     , VectorLine.ID
     , ObjectInfo(IntersectNodes(VectorGrid.Obj, VectorLines.Obj, 1), 20) "Intersections" 
   from VectorGrid, VectorLines 
   where VectorGrid.Obj intersects VectorLines.Obj 
   into Selection

It finds all the intersections between a vector grid cell and a vector line. The resulting query will hold the ID of the vector grid cell and the ID of the vector line and the number of intersections between these two.

The number of intersection can be: - 0: the vector line is complete within the vector grid cell and doesn't intersect witht the boundaries of the vector grid cell - 1: the vector line only intersects the vector grid cell once and so the vector line starts or ends inside the vector grid cell - 2+: The vector line starts and ends outside the vector grid cell - or it starts and ends inside the vector grid cell

If you want further details on this, you would need to investigate the relation of the start and/or end point of the vector lines compared to the vector grid cell.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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