[MapServer-users] INCLUDE a relative path file does not work in LABEL definition

Philippe Ghesquiere philippe.ghesquiere at airbus.com
Wed Jun 4 00:34:27 PDT 2025


Hi Jukka,

both files are in the same directory.
I tried :

   - INCLUDE  "TextCharacteristics.txt"
   - INCLUDE  "./TextCharacteristics.txt"

with the same error

Philippe

On Wed, Jun 4, 2025 at 9:19 AM Rahkonen Jukka <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Hi,
>
> From the documentation:
> "File paths may be given as absolute paths, or as paths relative to the
> location of the mapfile. In addition, data files may be specified relative
> to the SHAPEPATH."
>
> Is the place of your "TextCharacteristics.txt" now relative to what?
>
> -Jukka Rahkonen-
>
> ________________________________________
> Lähettäjä: MapServer-users <mapserver-users-bounces at lists.osgeo.org>
> käyttäjän Philippe Ghesquiere via MapServer-users <
> mapserver-users at lists.osgeo.org> puolesta
> Lähetetty: Keskiviikko 4. kesäkuuta 2025 9.46
> Vastaanottaja: mapserver-users at lists.osgeo.org <
> mapserver-users at lists.osgeo.org>
> Aihe: [MapServer-users] INCLUDE a relative path file does not work in
> LABEL definition
>
> Dear all,Environment :Windows : mapmanager, based on MapServer 8.0.1, GDAL
> 3.8.4Linux : MapServer 8.2.0, GDAL 3.8.4In order to make my map files more
> generic, I am using INCLUDE directives.When defining a LABEL, I tried to
> INCLUDE some common definitions. For example :MyClass.map file :CLASS
>  STYLE      ....   END   LABEL      EXPRESSION ('[NAME]' != 'UNK')
> TEXT       "[NAME]"      INCLUDE    "TextCharacteristics.txt"
>  ENDENDTextCharacteristics.txt file :POSITION CCCOLOR    "#000000"FONT
> condensedSIZE     12I get the following error :'load_Label(): Premature
> End-of-File. ;msyylex(): Unable to access file.Error opening included file
> "TextCharacteristics.txt"..Please correct the issue in the text tab'As a
> workaround, I gave the absolute file path to make it work.The documentation
> says that relative path could be used.Did I make something wrong ?Thanks
> for your helpPhilippeThe information in this e-mail is confidential. The
> contents may not be disclosed or used by anyone other than the addressee.
> Access to this e-mail by anyone else is unauthorised.If you are not the
> intended recipient, please notify Airbus immediately and delete this
> e-mail.Airbus cannot accept any responsibility for the accuracy or
> completeness of this e-mail as it has been sent over public networks. If
> you have any concerns over the content of this message or its Accuracy or
> Integrity, please contact Airbus immediately.All outgoing e-mails from
> Airbus are checked using regularly updated virus scanning software but you
> should take whatever measures you deem to be appropriate to ensure that
> this message and any attachments are virus free.
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20250604/a8306394/attachment-0001.htm>


More information about the MapServer-users mailing list