Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement missing options #8

Open
11 of 15 tasks
jbelien opened this issue Sep 1, 2018 · 5 comments
Open
11 of 15 tasks

Implement missing options #8

jbelien opened this issue Sep 1, 2018 · 5 comments
Assignees

Comments

@jbelien
Copy link
Owner

jbelien commented Sep 1, 2018

MAP

  • CONFIG (multiple)
  • DATAPATTERN
  • INCLUDE (multiple)
  • TEMPLATEPATTERN

LAYER

  • BINDVALS
  • CONNECTIONOPTIONS
  • GEOMTRANSFORM
  • OFFSITE (hexadecimal)
  • PROCESSING (multiple)

OUTPUTFORMAT

  • FORMATOPTION (multiple)

PROJECTION

  • Not EPSG

SYMBOL

  • POINTS (on single line)

STYLE

  • GEOMTRANSFORM
  • PATTERN (on single line)

FEATURE

  • POINTS (on single line)
@ghost
Copy link

ghost commented Sep 22, 2018

Sending again as I got a mail bounce from git hub.

Hi

CONFIG loads with no errors but is missing on the MAP page
IMAGECOLOR loads but the "#FFFFFF" format fails.
This occurs on COLOR definitions also, personally I don't have an issue, to me 255 255 255 is better but the spec supports the # directive.
Way back if I recall, the # value was the only accepted option.

OUTPUTFORMAT, a sub section of MAP loads but is missing.

INCLUDE '../symbols.map' with no errors but is missing on the MAP page
Not sure if there is a need to check if the files exist on INCLUDE, or leave it up to the map designers.

Re my previous message regarding

Undefined Offset:1
that was caused by the directive MINFEATURESIZE AUTO, which is used, commented it out in the BIG map, plus a few other and its now loaded everything, loads of Layers, 207!!!

Of course had the designers used xml (there is a definition, but I think its out of date)
then perhaps life would be easier!

Included is a test file

MAP
  NAME "PLANET"
  DEBUG 0
  CONFIG 'ON_MISSING_DATA' 'IGNORE'
  CONFIG "MS_ERRORFILE" "../debugFile.log"
  CONFIG "MS_ERRORFILE" "../mserror"
  CONFIG 'PROJ_LIB' '../'
  FONTSET '../fonts.lst'
  IMAGETYPE png
  MAXSIZE 4000
  SIZE 800 800
  UNITS meters
  EXTENT -20000000 -20000000 20000000 20000000
  ### Problem IMAGECOLOR "#C6E2F2"
  IMAGECOLOR 1 2 3
  SHAPEPATH '../pdata/osm-data/'
  WEB
      METADATA
          "ows_enable_request" "*"
          "wms_enable_request" "*"
          "wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857"
          "labelcache_map_edge_buffer" "-10"
          "wms_title" "Natural Earth World WMS"
      END
      IMAGEPATH '/tmp/ms_tmp/'
      IMAGEURL '/ms_tmp/'
  END
  DEBUG 5
  PROJECTION
      "init=epsg:3857"
  END
	OUTPUTFORMAT
		NAME "png_bw"
		DRIVER AGG/PNG8
		MIMETYPE "image/png;mode=8bit,grayscale"
		IMAGEMODE RGB
		EXTENSION "png"
		TRANSPARENT ON
		FORMATOPTION "PALETTE=grey.txt"
		FORMATOPTION "PALETTE_FORCE=on"
	END

  INCLUDE '../symbols.map'
  INCLUDE 'layers/l1.map'


LAYER
 GROUP "admin"
 STATUS ON
 MAXSCALEDENOM 41601025
 MINSCALEDENOM 20800512
 TYPE LINE
 NAME "borders4"
 PROJECTION
   "init=epsg:3857"
 END
 DATA "boundaries.shp"
 CLASS
    STYLE
       WIDTH 0.5
       #Problem COLOR "#FF2400"
       COLOR 123 123 123
    END
 END
END



LAYER
  TYPE LINE
  NAME "waterways17"
  STATUS ON
  GROUP "default"
  CONNECTIONTYPE POSTGIS
  CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
  DATA "geometry from (select geometry, osm_id, type, name as name from osm_waterways) as foo using unique osm_id using srid=3857"
  CLASSITEM "type"
  MAXSCALEDENOM 5078
  MINSCALEDENOM 2539
  LABELITEM "name"
  PROJECTION
      "init=epsg:3857"
  END
  PROCESSING "CLOSE_CONNECTION=DEFER"
  CLASS
      EXPRESSION "river"
      STYLE
          COLOR 153 179 204
          WIDTH 3
      END
      LABEL
        TYPE TRUETYPE
        PARTIALS FALSE
        FONT sc
        MINDISTANCE 200
        SIZE 8
        # Problem COLOR "#6B94B0"
        OUTLINEWIDTH 2
        REPEATDISTANCE 400
        MINFEATURESIZE AUTO  #### causes Undefined Offset:1
        ANGLE FOLLOW
        BUFFER 3
      END
  END

  END

END

@jbelien
Copy link
Owner Author

jbelien commented Sep 22, 2018

Hello @aimdev ,

Thanks again for all your feedback ! 👍


  • There is indeed an issue with hexadecimal colors ! I'll fix it !
  • There is also an issue with MINFEATURESIZE ! I'll take care of it !

But

  • I don't have any issue with OUTPUTFORMAT : all parameters seem fine !
  • Same with INCLUDE ! They are included at the end of the MapFile. I (of course) don't check the "included" file since I don't have access to it.

Are you using the last version of the application and the library ?
You can try https://mapfile.herokuapp.com/ to be sure !


EDIT :
Issues with hexadecimal colors and MINFEATURESIZE are now fixed !

MapFile PHP Library v2.0.3-beta
MapFile Generator v2.1.2-beta

@ghost
Copy link

ghost commented Sep 22, 2018 via email

@jbelien
Copy link
Owner Author

jbelien commented Sep 22, 2018

Okay, I understand your issue !

Unfortunately, at the moment, the application is only made to upload one single full MapFile.

I thought about being able to read "included" files but it will require to upload, store, and manage multiple MapFiles at the same time.
I'll keep looking for the best way to implement this but I don't have any idea at the moment ; it's quite tricky !
I create a new issue so I don't forget about it : #9

@ghost
Copy link

ghost commented Sep 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant