java mapscript, method pointObj.project

Ludovico Bianchini metlud at YAHOO.IT
Wed Sep 5 06:48:00 PDT 2007


Hi Oliver,
thanks for the reply and for including the mailing
list, I excluded it not intentionally.

I've deployed ms4w (I'm working on Windows XP Home
Edition), so I think that the only
place with epsg file is C:\ms4w\proj\nad.
Now I'm working with a canonical installation of
Apache, php and mapscript (I've copied
php_mapscript.dll in ext folder of php installation).
(Note: I have not delete C:\ms4w folder and
subfolders).
To work with mapserver in Java (jdk1.6.0_02) I've
copied mapscript.jar in 
C:\Programmi\Java\jdk1.6.0_02\jre\lib and
mapscript.dll in
C:\Programmi\Java\jdk1.6.0_02\jre\bin,
then import the library in NetBeans IDE.

I've executed depends.exe (a tool to examine dll
dependencies of a exetutable) on mapscript.dll and the
result is

DWMAPI.DLL
EFSADU.DLL
c:\windows\system32\SHLWAPI.DLL
c:\windows\system32\MPR.DLL
\ms4w\apache\cgi-bin\CFITSIO.DLL
\ms4w\apache\cgi-bin\GDAL14.DLL
\ms4w\apache\cgi-bin\GEOS_C.DLL
\ms4w\apache\cgi-bin\GEOTIFF.DLL
\ms4w\apache\cgi-bin\HDF5DLL.DLL
\ms4w\apache\cgi-bin\ICONV.DLL
\ms4w\apache\cgi-bin\LIBCURL.DLL
\ms4w\apache\cgi-bin\LIBEAY32.DLL
\ms4w\apache\cgi-bin\LIBECWJ2.DLL
\ms4w\apache\cgi-bin\LIBFCGI.DLL
\ms4w\apache\cgi-bin\LIBMAP.DLL
\ms4w\apache\cgi-bin\LIBMYSQL.DLL
\ms4w\apache\cgi-bin\LIBPQ.DLL
\ms4w\apache\cgi-bin\LIBTIFF.DLL
\ms4w\apache\cgi-bin\LIBXML2.DLL
\ms4w\apache\cgi-bin\LTI_DSDK_DLL.DLL
\ms4w\apache\cgi-bin\NETCDF.DLL
\ms4w\apache\cgi-bin\PDFLIB.DLL
\ms4w\apache\cgi-bin\PROJ.DLL
\ms4w\apache\cgi-bin\SQLITE3.DLL
\ms4w\apache\cgi-bin\SSLEAY32.DLL
\ms4w\apache\cgi-bin\SZLIBDLL.DLL
\ms4w\apache\cgi-bin\XERCES-C_2_7.DLL
\ms4w\apache\cgi-bin\ZLIB1.DLL
and many other windows dll located in
C:\windows\system32\

In the system PostgreSQL/PostGIS is running too, but I
don't think that proj library use resource
of the dbms...

It's all.

PS: actually I have solved the problem writing a
stored procedure in postgresql/postgis to convert
the coordinates
CREATE OR REPLACE FUNCTION get3003("varchar")
  RETURNS text AS
$BODY$
BEGIN
return astext(transform(geomfromtext('POINT(' || $1 ||
')', 4326), 3003));
END
$BODY$
  LANGUAGE 'plpgsql' IMMUTABLE;

Bye,
Ludovico


--- Oliver Wesp <wesp at GDV.COM> ha scritto:

> Dear Ludovico,
> 
> Maybe there is another epsg file on your system?
> What's your operating 
> system and where is the projection library located?
> 
> regards,
> Olli
> 
> P.S. I'm sure other people will benefit from this or
> maybe someone other 
> than myself has a clue regarding your problem so I
> included the mailing 
> list.
> 
> Ludovico Bianchini schrieb:
> > Thanks for the quick reply, now I have another
> > problem: I rename the epsg file in \nad\epsg to
> > \nad\_epsg, but there is no error...is there
> another
> > file the library uses if doesn't find epsg?
> > 
> > I've made this test because I try to insert a
> towgs
> > parameter to the projection line, but when I
> perform
> > this
> > x = 1752000f;
> > y = 5062000f;
> > point.setX(x);
> > point.setY(y);
> > point.project(new
> projectionObj("init=EPSG:26591"),
> > new projectionObj("init=EPSG:4326"));
> > 
> > to discover the longitude latitude of a point
> situated
> > in Italy (26591 is for Monte Mario (Rome) / Italy
> zone
> > 1) I obtain (37.13953463591601 45.66405322544534),
> > which is situated in Russia.
> > 
> > --- Oliver Wesp <wesp at GDV.COM> ha scritto:
> > 
> >> Hi Ludovico,
> >>
> >> this means that you're using a projection that's
> not
> >> defined in your 
> >> epsg file.
> >>
> >>
> >
>
http://mapserver.gis.umn.edu/docs/error/proj-init-file
> >> best regards,
> >> Oliver
> >>
> >> Ludovico Bianchini schrieb:
> >>> Hi,
> >>> I'm obtaining this
> >>>
> >>> Exception occurred during event dispatching:
> >>> java.lang.UnknownError: msProcessProjection():
> >>> Projection library error. no options found in
> >> 'init'
> >>> file
> >>>         at
> >>>
> >
>
edu.umn.gis.mapscript.mapscriptJNI.new_projectionObj(Native
> >>> Method)
> >>>         at
> >>>
> >
>
edu.umn.gis.mapscript.projectionObj.<init>(projectionObj.java:41)
> >>> with this line of code:
> >>>
> >>> point.project(new
> projectionObj("init=EPSG:4326"),
> >> new
> >>> projectionObj("init=EPSG:3003"));
> >>>
> >>> while with this
> >>>
> >>> point.project(new
> projectionObj("init=EPSG:4326"),
> >> new
> >>> projectionObj("init=EPSG:26591"));
> >>>
> >>> there is no error.
> >>>
> >>> Point is initialized with (37.13953463591601
> >>> 45.66405322544534), a decimal degrees lon-lat
> >> value.
> >>> Has anybody solved this or a similar problem?
> >>>
> >>> Thanks in advance for any help!!
> >>>
> >>> Ludovico


      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html



More information about the MapServer-users mailing list