oracle spatial
Daniel Goetz
madprof at GMX.CH
Wed Jun 14 03:06:54 PDT 2006
Jukka,
thank you again for your help and your tests.
Now I have a general question: Is it not possible to map shapefile or raster data after swapping the .dll-files to get oracle spatial support. Do I have to paste the "old" libmap.dll in the cgi-bin folder before mapping shapefile (or other formats) again? I thought it is possible to map oracle spatial data and other file-formats (e.g. shapefiles) at the same time? Am I wrong with this assumption?
Thank you for your answer and your help. May Thanks.
regards
Daniel
-------- Original-Nachricht --------
Datum: Wed, 14 Jun 2006 12:24:22 +0300
Von: Rahkonen Jukka <Jukka.Rahkonen at MMMTIKE.FI>
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] oracle spatial
> Hi,
>
> Yes, I made a test with a fresh installation and playing with those two
> files is really enough to make Oracle available for me. Switching back to the
> original libmap.dll does not effect the other layers, but Oracle layer
> disappears, naturally. Rename it, restart Apache, and it is back, even without
> closing the MapLab application in between. I don't have any idea why .dll
> swapping harms your old projects.
>
> -Jukka-
>
>
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Daniel Goetz
> Lähetetty: 14. kesäkuuta 2006 10:34
> Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU
> Aihe: Re: [UMN_MAPSERVER-USERS] oracle spatial
>
> Thanks Rahkonen for your reply,
>
> you did the .dll swapping like described in the readme-file of the ms4w
> package and then just used the below mentioned connection string? That's all?
> But when I do this and test other .map-file porjects that have worked fine
> before the .dll swapping on my Computer (raster-data or shapefiles) I get
> an apache-error. In my opinion this means that after the .dll swapping my
> apache-server didn't work anymore the way it should.
>
> Again: you simplya have copied the "libmap.dll" in the
> "Apache/cgi-bin/ignored-libmap/oracle10g/"-folder and pasted it in the "Apache/cgi-bin"-folder
> and then copied the "ogr_OCI.dll" from the
> "ms4w/gdalplugins/ignored"-folder and pasted it in the "ms4w/gdalplugins"-folder and then restarted
> apache? And then everything worked fine? You are sure you haven't done anything
> elese?
>
> When I try this the apache server gives an erorr-message whether I try
> .mapfiles using oracle spatial data or shapefiles or anything else.
>
> Thank you again Rahkonen. Perhaps you or anybody out there has an idea
> what to do in my case. Thank you for your help.
>
> regards
>
> Daniel
> -------- Original-Nachricht --------
> Datum: Wed, 14 Jun 2006 10:06:18 +0300
> Von: Rahkonen Jukka <Jukka.Rahkonen at MMMTIKE.FI>
> An: MAPSERVER-USERS at LISTS.UMN.EDU
> Betreff: Re: [UMN_MAPSERVER-USERS] oracle spatial
>
> > Hello,
> >
> > I can say only that I had no problem in connecting to my Oracle 9i
> > database with MS4W installation. I did just the manouvres described in
> > the readme-file, and did not set any new environment variables.
> > My connection string is like:
> >
> > CONNECTIONTYPE ORACLESPATIAL
> > CONNECTION "USER/PASSWD at DB.WORLD"
> > DATA "GEOLOC FROM GIS_POLYGONS USING UNIQUE MSLINK"
> >
> > Have you tried to feed the SQL statement from the error message
> > directly to SQL-Plus? Do you get results then? Is your spatial table
> > OK for Mapserver? I do not know exactly what Mapserver needs, but for
> > Geoserver there must exist a numerical primary key, spatial index and
> > a correct entry in SDO_GEOM_METADATA. In my case if I can connect my
> > data with Geoserver it is available for Mapserver as well.
> >
> > Good luck,
> >
> > -Jukka Rahkonen-
> >
> > ________________________________
> >
> > Lähettäjä: UMN MapServer Users List puolesta: Daniel Goetz
> > Lähetetty: ti 13.6.2006 17:00
> > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU
> > Aihe: Re: [UMN_MAPSERVER-USERS] oracle spatial
> >
> >
> >
> > Thanks Wim for your help,
> >
> > but the syntax in the command-line of the browser didn't bring the
> > solution.
> >
> > Roundup:
> > I have installed Oracle 10g Release 1 client on my computer. Then
> > unzipped the latest ms4w package. Did teh .dll swapping for oracle
> > spacial support like described in the redme-file of the ms4w-package.
> > Then I wrote a mapfile using the native oracle spatial support of the
> > mapserver (not the OGR-Support).
> >
> > MAP
> > NAME "Nbg"
> > #EXTENT 426666.49 466058.21 448321.44 490754.58 EXTENT 433000 478000
> > 434000 479000 #SIZE 1400 1800 SIZE 400 400 SHAPEPATH
> > "/ms4w/Apache/htdocs/raster/daten"
> > IMAGETYPE PNG
> > IMAGECOLOR 255 255 255
> > UNITS METERS
> > STATUS ON
> > PROJECTION
> > "init=epsg:4326"
> > END
> >
> > WEB
> > IMAGEPATH "c:\ms4w\Apache\htdocs\raster\tmp\"
> > IMAGEURL "/raster/tmp/"
> > TEMPLATE "test_template.html"
> > END
> >
> >
> > LAYER
> > NAME "RWG"
> > CONNECTIONTYPE OracleSpatial
> > CONNECTION "username/password at service"
> > DATA "GEOM FROM RWG_TBL USING SRID 82032"
> > TYPE POINT
> > STATUS ON
> > PROJECTION
> > "init=epsg:4326"
> > END
> > CLASS
> > NAME "Punkte"
> > STYLE
> > OUTLINECOLOR 128 128 128
> > COLOR 225 225 185
> > END
> > END
> > END
> >
> > END
> >
> > Then I did some settings in the httpd.cong of the apache server like
> > described in the "Using oracle spatial" howto. But I don't really know
> > whether this was right. In the "ENV VARS" column I added the parameter:
> >
> > SetEnv ORACLE_HOME "c:/ora10gR1_client"
> > SetEnv TNS_ADMIN "c:/ora10gR1_client/NETWORK/ADMIN"
> > SetEnv PATH "c:/ora10gr1_client/bin"
> >
> > I saved this and restarted apache. Then I tried to map the oracle data
> > via umn-mapserver. Therefor I wrote the following in my browser:
> >
> > http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/
> > test_os_native.map&layers=all&mode=map
> >
> > Then I get a error-message from apache:
> >
> > "Internal Server Error.The server encountered an internal error or
> > misconfiguration and was unable to complete your request."
> >
> > In the errorlog of the apache the following was logged:
> >
> > [Tue Jun 13 15:45:56 2006] [error] [client 127.0.0.1] Premature end of
> > script headers: mapserv.exe
> >
> > But I don't know what this means. But when I consciously do some
> > mistake in the DATA expression in the .mapfile (giving a tablename
> > that does not exist in the database) I get the following error-message
> > from the mapserver (and not the apache):
> >
> > msDrawMap(): Image handling error. Failed to draw layer named 'RWG'.
> > msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
> ORA-00942:
> > Tabelle oder View nicht vorhanden . Query statement: SELECT rownum,
> > GEOM FROM RWG_TBL.g WHERE SDO_FILTER( GEOM, MDSYS.SDO_GEOMETRY(2003,
> > 82032,
> > NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(4330
> > 00,478000,434000,479000)
> > ),'querytype=window') = 'TRUE' . Check your data statement.
> >
> > So you can see that mapserver is able to connect to the database,
> > because it says that the Table or View is not available.
> > The really astonishing is that after doing the .dll swapping for
> > oracle spatial support other mapserver-projects that have worked fine
> > on my computer before the swapping cause the same appache error-message.
> > Could anybody imagine what might be the problem? Might it be that
> > mapserver and the version of my oracle client (10g Release 1) are not
> > compiled against each other? Or is there another mistake I have done?
> >
> > Please help me. I would be very glad and thankful for any hint. Thank
> > you so much.
> >
> >
> > regards
> >
> > Daniel
> >
> >
> > -------- Original-Nachricht --------
> > Datum: Mon, 12 Jun 2006 20:08:22 +0200
> > Von: Wim Blanken <w.blanken at geon.nl>
> > An: \'Daniel Goetz\' <madprof at GMX.CH>
> > Betreff: RE: [UMN_MAPSERVER-USERS] oracle spatial
> >
> > > Hello Daniel,
> > >
> > > I think your solution is simple. You have to specify &mode=map on
> > > the commandline to make it work. If you don't mapserver needs a
> > > template to show the results of the cgi-call.
> > >
> > >
> > http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/
> > test_o
> > > s_ogr.map&layers=all&mode=map
> > >
> > >
> > > Regards
> > >
> > > Wim Blanken
> > >
> > >
> > > -----Original Message-----
> > > From: UMN MapServer Users List
> > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Daniel Goetz
> > > Sent: Monday, June 12, 2006 1:54 PM
> > > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > > Subject: [UMN_MAPSERVER-USERS] oracle spatial
> > >
> > > Hi,
> > >
> > > I have the ms4w installed on my computer and I want to map geodata,
> > lying
> > > in
> > > a oracle spatial database on a server in the intranet, via umn
> > mapserver.
> > > Therefor I enabled OGR-OCI support described in the readme-file of
> > > the ms4w-package (I "installed" 10g oracle instant client on my
> > > computer,
> > set
> > > set windows environmet variable PATH and did the described .dll
> > swapping).
> > >
> > > Then I tested, whether OGR now supports the OCI with ogrinfo.
> > > Therefor I had to modify the syntax a littel bit to get information:
> > > I wrote "ogrinfo "OCI:username/password at host:port/service_name"
> > > instead of described on
> > the
> > > ogr-site/oracle spatial "OCI:username/password at service_name". The
> > > result was that ogrinfo listed me the relevant tables that contain
> > > geometric data.
> > >
> > > Then I tried to map the data via mapserver. Therefor I wrote the
> > following
> > > .map-file (therefor I correspond to the example given in the "Vector
> > Data
> > > Access-Reference-Guide" on the mapserver-site):
> > >
> > > MAP
> > > NAME "Oracle"
> > > EXTENT 426666.49 466058.21 448321.44 490754.58 SIZE 1400 1800
> > > SHAPEPATH "/ms4w/Apache/htdocs/raster/daten"
> > > IMAGETYPE PNG
> > > IMAGECOLOR 255 255 255
> > > UNITS METERS
> > > STATUS ON
> > > CONFIG "GDAL_DRIVER_PATH" "C:/ms4w/gdalplugins"
> > >
> > > WEB
> > > IMAGEPATH "c:\ms4w\Apache\htdocs\raster\tmp\"
> > > IMAGEURL "/raster/tmp/"
> > > TEMPLATE "test_template.html"
> > > END
> > >
> > > LAYER
> > > CONNECTIONTYPE OGR
> > > CONNECTION "OCI:username/password at service_name"
> > > DATA "RWG_TBS"
> > > NAME "RWG_TBS"
> > > TYPE POLYGON
> > > STATUS ON
> > >
> > > CLASS
> > > NAME "Flaeche"
> > > STYLE
> > > OUTLINECOLOR 128 128 128
> > > COLOR 225 225 185
> > > END
> > > END
> > > END
> > > END
> > >
> > >
> > > The template I wrote therefor is very simple:
> > >
> > > <html>
> > > <head>
> > > <title>Erstes Beispiel zum UMN Mapserver</title>
> > > </head>
> > >
> > > <body>
> > > Mapserver-Version auslesen:<br><br>[version]<br><br><br>
> > > Karte einbetten:<br><br>
> > > <img src="[img]"><br>
> > >
> > > </body>
> > > </html>
> > >
> > > And I tried to start mapping by writing the following in my browser:
> > >
> > >
> > http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/
> > test_o
> > > s_ogr.map&layers=all&
> > >
> > >
> > > The result was, that mapserver brought the error-message:
> > >
> > > "mapserv(): Web application error. No template provided. "
> > >
> > > Then I tested some other mapserver-test-projects, for whom I know
> > > that they have worked properly on my computer before the mentioned
> > > .dll swapping
> > for
> > > OGR-OCI support. The result was the same:
> > >
> > > "mapserv(): Web application error. No template provided. "
> > >
> > >
> > > So I have three questions:
> > >
> > > How should mapserver know where the database is located without
> > > giving
> > him
> > > any information about the host-address and the port-number. Where
> > > can I provide this information for the mapserver. In the case of
> > > ogrinfo I did this by writing
> > > "OCI:username/password at host:port/service_name". In the .mpa-file
> > > example in the "Vector-Data-Reference-Guide" they say under
> > > CONECTION you should type "OCI:username/password at service_name".
> > > Where is the information about the location of the database?
> > >
> > > Second questions is: Is anything wrong with my .map-file,
> > > html-template
> > or
> > > the starting-command in the web-browser?
> > >
> > > Third: And why do the other mapserver projects, I tested before .dll
> > > swapping (for OGR-COI support), work anymore. Why do I always get
> > > the error-message "mapserv(): Web application error. No template
> provided."
> > > although I changed nothing on the .map-files, the template nor the
> > > command.
> > >
> > > I would be very pleased and hayppy and thankful if anybody would
> > > help me on my problem. This would really be very nice. Thank you so
> > > much for your endeavors.
> > >
> > > Regards
> > >
> > > Daniel
> > >
> > >
> > > --
> > >
> > >
> > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > >
> > >
> > >
> > > --
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.1.394 / Virus Database: 268.8.3/361 - Release Date:
> > > 6/11/2006
> > >
> >
> > --
> >
> >
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>
> --
>
>
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
--
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
More information about the MapServer-users
mailing list