Jump to content

 
Photo

Mapbasic Code for Labelling

- - - - -

  • Please log in to reply
2 replies to this topic

#1
GISuser

GISuser

    Newbie

  • New Member
  • Pip
  • 1 posts
  • Australia

Hi,

I'm making some maps at the moment that will be created in a batch mapping program.
I'm wanting to add the labels and run a program that checks that they don't over lap and if the do then place them in a different spot.

Has anyone done a program like this, not sure where to start.

All replys will be greatly appreciated.

#2
gregsd

gregsd

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 168 posts
  • Gender:Male
  • Location:Surrey, England.
  • Interests:Cycling, mostly off-road (MTB) riding.
  • United Kingdom

Hi,

I'm making some maps at the moment that will be created in a batch mapping program.
I'm wanting to add the labels and run a program that checks that they don't over lap and if the do then place them in a different spot.

Has anyone done a program like this, not sure where to start.

All replys will be greatly appreciated.


MapInfo has a built in function to avoid overlaps on labels, so you would need to enable this for the layer that you're labelling - Set Map .... Label Overlap On. You may also need to set some of the other options, like 'PartialSegment ON' to make sure that all of the objects in the map window are labelled.

The best way to see how the 'Set map ... ' statement is constructed is to open the MapBasic window in MapInfo and then set the label options via Layer Control.

Let me know if you need any further help with this.

Greg.


Greg Driver

GIS Analyst
MapInfo User...!

#3
loximuthal

loximuthal

    Key Contributor

  • Validated Member
  • PipPipPip
  • 95 posts
  • Gender:Male
  • Location:Bowie, MD
  • United States

Another option is to use another software package to do the labeling, one in which you can control the overlap rules, plus much else about labeling. Here at the Census Bureau we use a software by the company MapText. The one we use is developed just for us, but they do have a closely related public product, LabelEZ. It may be more than you are looking for, but they provide very good results.
Andy McIntire
US Census Bureau




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->