[MXD2map-devel] first impressions, support for query layers

Stephan Holl stephan.holl at intevation.de
Mon Apr 16 10:51:57 CEST 2012


Hello Daniel,

[CC: mxd-devel]

Daniel Araujo Miranda <miranda.dam at dpf.gov.br>, [20120404 - 11:09:55]

> Hi, Stephan! Thanks for your answer.
> 
> About the part:
> 
>   "  it cannot find the (needed) SDE-libs since it tryies to access
> an SDE datasource. There are a few sde-dlls needed to access this
> plugin. Make sure you put them in the right folder of your
> mapserver-installation "mxd2map-devel at wald.intevation.org
> 
> The dlls were certainly in place. It might be the "query layers" part 
> that triggered the dll loading in the wrong way. I phased out my SDE 
> database, so I can not test it properly.
> 
> It may be a while before I get back to you on the bug reports
> (already submitted) or code patches.

Great! I love to include your patches into a new release if you provide
them. Just attach them to the relevant ticket so we can check and
commit them.

Best regards

	Stephan


> 
> On 03/29/2012 05:03 AM, Stephan Holl wrote:
> > Hello Daniel,
> >
> > Daniel Araujo Miranda<miranda.dam at dpf.gov.br>, [20120328 - 16:10:45]
> >
> >> Hello Stephan - and others on the list.
> >>
> >> 	I am trying to use mxd2map with ArcGis Desktop 10.0 service
> >> pack 3 (ArcInfo) under Windows 7 Professioal and I am getting a few
> >> errors. Please help me out. I have about 800 layers which I would
> >> like to make available using mapserver and they are all styled
> >> already in ArcGIS. (google for Inteligeo and fosslc if you would
> >> like to know a little bit more about my system)
> >> 	The bottom line is that I am using ArcGIS Query Layers to
> >> add postgis layers WITHOUT ArcSDE, and that does not seem to be
> >> supported by mxd2map.
> >
> > Yes, you are right. This is not supported yet.
> >
> >> I would appreciate any directions and I volunteer to
> >> contribute code/docs. Three sections follow: tests, bugs and
> >> feature wishlist:
> >
> > Great to see you are willing to contribute!
> >
> >>
> >>
> >> ===tests===
> >>
> >> *  First try (where is the "logging file"?):
> >>
> >> C:\Program Files (x86)\MXD2map>java -jar mxd2map.jar -m
> >> "c:\temp\test.mxd" -a "c:\temp\test.map" -t "c:\temp\template.map"
> >> 2012-03-28 11:27:29,146 [main] ERROR de.intevation.mxd.Converter -
> >> General error. See logging file for more information.
> >>
> >>
> >> *  Second try (changed the template file path - is this a bug?):
> >
> > not that I am aware of, probably use the config-file?!
> >
> >> C:\Program Files (x86)\MXD2map>java -jar mxd2map.jar -m
> >> "c:\temp\test.mxd" -a "c:\temp\test.map" -t example\template.map
> >> 2012-03-28 11:47:56,625 [main] ERROR
> >> de.intevation.mxd.reader.FeatureLayerReader - Could not read unique
> >> value data.java.lang.NullPointerException
> >> 2012-03-28 11:47:56,671 [main] INFO
> >> de.intevation.mxd.utils.MapScriptUtils - Renamed "Unidades de
> >> Criminalistica" to "UnidadesdeCriminalistica".
> >> 2012-03-28 11:47:56,671 [main] INFO
> >> de.intevation.mxd.writer.MapScriptWriter - SDE datasource found.
> >> Please edit password in mapfile.
> >> Exception in thread "main" java.lang.UnknownError:
> >> loadCustomLayerDLL: General error message. Failed to load dynamic
> >> Layer LIB:
> >> c:/ms_6.1-dev/bin/ms/plugins/msplugin_sde_93.dll;msGetSymbol():
> >> General error message. Can't load requested dynamic library:
> >> c:/ms_6.1-dev/bin/ms/plugins/msplugin_sde_93.dll at
> >> edu.umn.gis.mapscript.mapscriptJNI.layerObj_setConnectionType(Native
> >> Method)
> >>           at
> >> edu.umn.gis.mapscript.layerObj.setConnectionType(layerObj.java:678)
> >>           at
> >> de.intevation.mxd.writer.MapScriptWriter.writeLayer(MapScriptWriter.java:389)
> >>
> >>           at
> >> de.intevation.mxd.writer.MapScriptWriter.write(MapScriptWriter.java:137)
> >>           at de.intevation.mxd.Converter.main(Converter.java:139)
> >
> >
> > it cannot find the (needed) SDE-libs since it tryies to access an
> > SDE datasource. There are a few sde-dlls needed to access this
> > plugin. Make sure you put them in the right folder of your
> > mapserver-installation.
> >
> >>
> >> * third try: Since I was unable to load msplugin_sde_93.dll, I
> >> tryed again copying the entire apllication to c:\mxd2map with the
> >> same results of the second try.
> >>
> >> * fourth try: tried from c:\mxd2map with a very simple mxd pointing
> >> to a shapefile (projection not recognized - SAD69, epsg 4618):
> >> java -jar mxd2map.jar -m "c:\temp\test2.mxd" -a "c:\temp\test.map"
> >> -t example\template.map
> >> Exception in thread "main" java.lang.UnknownError:
> >> msProcessProjection(): Projection library error. no options found
> >> in 'init' file
> >>           at
> >> edu.umn.gis.mapscript.mapscriptJNI.mapObj_setProjection(Native
> >> Method) at
> >> edu.umn.gis.mapscript.mapObj.setProjection(mapObj.java:453) at
> >> de.intevation.mxd.writer.MapScriptWriter.writeMap(MapScriptWriter.java:181)
> >>           at
> >> de.intevation.mxd.writer.MapScriptWriter.write(MapScriptWriter.java:135)
> >>           at de.intevation.mxd.Converter.main(Converter.java:139)
> >>
> >
> > This one is easy to fix. It just tells, that the underlaying
> > epsg-file does not find your EPSG-code. Search for the file and add
> > your projections there. The included file is stripped down to only
> > a few projections our customers need.
> >
> >> * fifth try: reprojected the shapefile to WGS84 and updated the
> >> MXD, everything went fine:
> >> C:\mxd2map>java -jar mxd2map.jar -m "c:\temp\test2.mxd" -a
> >> "c:\temp\test.map" -t example\template.map
> >> 2012-03-28 11:59:45,731 [main] INFO
> >> de.intevation.mxd.writer.MapScriptWriter - Mapfile created:
> >> c:\temp\test.map
> >
> > Good!
> >
> >>
> >> ===Possible bugs found so far===
> >>
> >> *  does not accept arbitrary coordinate reference systems in the
> >> source layers. Should output a warning and fall back to a default
> >> so the user can fix by hand later.
> >
> > right, described solution above.
> >
> >> *  crashes on query layers (direct postgis connection without SDE).
> >> If this feature is not implemented, at least try to output the
> >> layer styles.
> >
> > right, query layers are not yet supported. Outputting only the style
> > does not work without implementing the query-layers-access. This is
> > not a big deal btw., but it is not yet done :-/
> >
> >>
> >> *  "extent" line of the mapfile (line 3) uses system decimal
> >> separator instead of "."(dot). In my case, mxd2map wrote ","(comma)
> >> as a decimal separator and mapserver complained "getDouble():
> >> Symbol definition error. Parsing error near (,):(line 3)"
> >
> > Good one. Please file a ticket inside the issue-tracker[1].
> >
> >>
> >> *  mxd2map did not accept "-t" parameter (template file) with full
> >> path, only with relative path.
> >
> > OK, please file also a ticket at the tracker [1].
> >
> >>
> >> *  in windows: mapfile missing line CONFIG "PROJ LIB"
> >> "C:/ms4w/proj/nad"
> >
> > you can adjust that within your template and it will be available in
> > the resulting mapfile.
> >
> >> ===Interesting missing features===
> >> *  support for query layers
> >> *  support (best effort) for arbitrary CRSs.
> >> *  a little more documentation explaining where to put the mapfile
> >> (I found out it has to be in c:\ms4w\Apache\cgi-bin) (I know, this
> >> belongs to mapserver docs, but one or two lines in the docs
> >> wouldn't hurt)
> >
> > right, put it on my TODO-list. But generally it can be put anywhere,
> > depending on the mapserver-installation. I do not user ms4w though.
> >
> >> *  a little more documentation about the url invocation, which I
> >> found it to be
> >> "http://127.0.0.1/cgi-bin/mapserv.exe?map=test.map" (also belongs
> >> to mapserver docs, but I am a complete mapserver newbie)
> >
> > applies same as above :-) mapserver-details for viewing the results.
> >
> >> *  mapserver template for displaying the mapfile straight from the
> >> url http://127.0.0.1/cgi-bin/mapserv.exe?map=test.map. Right now
> >> mapserver outputs "mapserver(): Web application error. Traditional
> >> BROWSE mode requires a TEMPLATE in the WEB section, but none was
> >> provided"
> >
> > Use the&template=openlayers in the URL for previewing
> > (Mapserver-feature since MS 6.0)
> >
> >
> >> Thanks for the great product.
> >
> > Nice to hear that, thanks!
> >
> > Best regards
> >
> > 	Stephan
> >



-- 
Stephan Holl <stephan.holl at intevation.de> | Tel.: +49 (0)541-33 508 3663
Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.wald.intevation.org/pipermail/mxd2map-devel/attachments/20120416/b835def1/attachment.sig>


More information about the MXD2map-devel mailing list