Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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?

share|improve this question

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

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.