Java with MapServer on Projection

Francesco Martinelli martinelli at PI.INGV.IT
Thu Dec 7 03:33:37 PST 2006


Dear friends,
I am trying to use the PROJECTION section in a map file using MapScritpt
via Java on Windows.

The map file is very basic, and when using the map file reported below the
program works fine; if I uncomment the three lines about PROJECTION I have
the following error:

Exception in thread "main" java.lang.UnknownError: No such file or directory
        at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
        at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:312)
        at Demo.Main.<init>(Main.java:10)
        at Demo.Main.main(Main.java:16)
Java Result: 1

I "suspect" the reason is some unreacheable file or directory used by the
proj.dll (??), however the PATH include C:\ms4w\Apache\cgi-bin (where
proj.dll is located whith the distribution package).

The map file is the following (and it works if used via PHP !!):
MAP
  IMAGETYPE PNG
  EXTENT 126500 3907000 1521500 5302000
  UNITS METERS
  SIZE 600 600
  IMAGECOLOR 230 230 90
  TEMPLATEPATTERN "itasca"
  LAYER
    NAME "areas"
    CONNECTIONTYPE postgis
    CONNECTION "user=DBroot password=root dbname=s1 host=127.0.0.1 port=5432"
    DATA "the_geom FROM (SELECT * FROM aree_geografiche ORDER BY tipo_area
DESC) AS confini USING UNIQUE gid"
    TYPE POLYGON
    STATUS ON

#    PROJECTION
#      "init=epsg:32632"
#    END

    CLASS
      NAME "States"
      STYLE
        WIDTH 3
        COLOR 194 194 194
        OUTLINECOLOR 0 0 0
      END
    END
  END
END # Map File

Thank you,
Francesco.



More information about the MapServer-users mailing list