[mapserver-users] Re: process survive after killing apache

2010-10-27 Thread Sebastian E. Ovide
Is there any way of telling to MapServer to kill himself after xx seconds ?

It keep running for ever using 100% of CPUs... (Kernel CPU)... it seams to
happen with huge polygons...


On Thu, Oct 21, 2010 at 4:26 PM, Sebastian E. Ovide 
sebastian.ov...@gmail.com wrote:

 Hi All,

 I'm having 2 problems:

 1) Mapserver uses 100% for infinite time... (hangs !) for some layers...
 2) Mapserver survives after killing Apache (same with lighttpd). It even
 wont die with a sudo killall mapserv at least that I pass the -9
 parameter.

 Any ideas ?

 (I'm running Mapserver on a VMware... , same problem with fastcgi or simple
 cgi)



 --
 Sebastian E. Ovide






-- 
Sebastian E. Ovide
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Best Practices for the Spatial Index with Oracle DB 11gR2

2010-10-27 Thread Julian Wiersbitzki
Hi List!

I am new here in this list and with mapserver, so please tell me if my question 
is already a faq.

We have mapserver 5.6.3 in use together with an Oracle DB 11gR2 Standard 
Edtion. All works well so far and configuring layer with the mapfile is no 
problem. But we have two layers which use SDO-Function in the SELECT Statement, 
e.g.:

   DATA the_geom from (SELECT SDO_GEOM.SDO_CENTROID(geometrie, 2) AS the_geom, 
id FROM ereignis) USING SRID 31468
or
   DATA the_geom from (SELECT SDO_AGGR_UNION(SDOAGGRTYPE(the_geom, 0.005)) AS 
the_geom, bezirksinspektion AS label FROM stadtbezirk GROUP BY 
bezirksinspektion) USING SRID 31468

If I want to fetch one of these layers the mapserver tells me there is no 
spatial index. Normally we have spatial indexes on all our tables with 
SDO_GEOMETRY columns, e.g.:

INSERT INTO user_sdo_geom_metadata VALUES (
  UPPER('ereignis'),
  UPPER('geometrie'),
  MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X',4452550.887,4479484.083,0.001),
MDSYS.SDO_DIM_ELEMENT('Y',5324953.39701,5345694.05299,0.001)),
31468);
CREATE INDEX ereignis_geom_idx ON ereignis(geometrie) INDEXTYPE IS 
MDSYS.SPATIAL_INDEX;

But how do I create a spatial index on SDO-functions in the database? Can I 
even do that? The documentations only describes spatial index on SDO_GEOMETRY 
columns, but not on spatial functions.

What are the best practices for this kind of layers?

TIA, Julian

__

Hamburger Berater Team GmbH   Handelsregister: HRB 31629
Stadthausbrücke 3 (Fleethof)  Amtsgericht Hamburg
20355 Hamburg Geschäftsführer:
Fon:  040/369779-43   Ilse Habermann
Fax:  040/369779-99   Hans-Joachim Habermann
Mail: mailto:j...@hbt.de  Daniel Hoffmann
__

Internet:   http://www.hbt.de
http://www.geofox.dehttp://www.geonetwatch.de
__

DIN EN ISO 9001:2000: DQS-Zertifikat Nr.5206 QM
Diese Email wurde mit ständig aktualisierten Virenscannern geprüft
__

Diese Email einschließlich eventuell angehängter Dateien 
enthält vertrauliche Informationen und ist ausschließlich 
für den bezeichneten Adressaten bestimmt. Wenn Sie nicht 
der richtige Adressat oder dessen Vertreter sind, verständigen 
Sie bitte sofort den Absender und löschen Sie dann diese Email 
und eventuell angehängte Dateien. Vielen Dank!
Beachten Sie: Jede Form der Nutzung, Vervielfältigung oder 
Weitergabe des Inhalts fehlgeleiteter Emails ist unzulässig.
__

This e-mail is intended only for the above addressee. 
It may contain privileged information. If you are not the 
addressee you must not copy, distribute, disclose or use any 
of the information in it. If you have received it in error 
please delete it and immediately notify the sender. 
__
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: process survive after killing apache

2010-10-27 Thread Stefano Ferri
Usually i use a cron to manage this situation, with a little bash script
Ciao
stefano


2010/10/27 Sebastian E. Ovide sebastian.ov...@gmail.com

 Is there any way of telling to MapServer to kill himself after xx seconds ?

 It keep running for ever using 100% of CPUs... (Kernel CPU)... it seams to
 happen with huge polygons...


 On Thu, Oct 21, 2010 at 4:26 PM, Sebastian E. Ovide 
 sebastian.ov...@gmail.com wrote:

 Hi All,

 I'm having 2 problems:

 1) Mapserver uses 100% for infinite time... (hangs !) for some layers...
 2) Mapserver survives after killing Apache (same with lighttpd). It even
 wont die with a sudo killall mapserv at least that I pass the -9
 parameter.

 Any ideas ?

 (I'm running Mapserver on a VMware... , same problem with fastcgi or
 simple cgi)



 --
 Sebastian E. Ovide






 --
 Sebastian E. Ovide





 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
Ing. Stefano Ferri
Cartografia GIS, Analisi Ambientali, Rilevamento Dati, Rilevamento
Batimetrie.

Nota - D.lgs 196/2003 Testo Unico Privacy
Le informazioni contenute nella presente e-mail ed in ogni eventuale file
allegato sono riservate e comunque destinate esclusivamente alla persona o
ente sopra indicati. Non è dunque consentita la sua diffusione, se non
espressamente autorizzata, da persona diversa dal suddetto destinatario. Se
doveste ricevere questa e- mail per errore Vi preghiamo di eliminarla dai
vostri archivi informatici e di darne gentile comunicazione al mittente.
Dati gli attuali standard di sicurezza in Internet non ci è possibile
garantire la totale integrità del messaggio inviato.

Phone +39-328-2923692
Email: stefano.fe...@stesurf.com
Web: www.stesurf.com
Web: www.portolanonline.it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Maximum number of points in a poligon

2010-10-27 Thread Sebastian E. Ovide
Hi All,

I have a shape with 2M polygons. The biggest one has 13k points. It works
very well, and fast enough.

I have another shape with 300k polygons and the biggest one has 800k
points... This shape hangs MapServer !... and I have to kill the process by
hand using kill -9. (see the other thread: process survive after killing
apache). The shape files can be opened with ogrinfo though

Is there a maximum number of points for single polygon supported by
MapServer ?

Thanks
-- 
Sebastian E. Ovide
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Best Practices for the Spatial Index with OracleDB 11gR2

2010-10-27 Thread Rahkonen Jukka
Hi,

I made a little test and I believe it is just impossible.  Oracle cannot do 
spatial query for the transformed geometries (centroids) returned by the first 
SELECT. It cannot find where the centroids are because they are not indexed and 
the index of the primary table does not help. You can for sure use centroids by 
pushing them into a new table or column and creating spatial index. There may 
be some SQL/Oracle trick to do it in some other way, PL/SQL people are doing 
amazing things but I am not aware of any.

This is the query I used for testing and Oracle messages.  I am not at all sure 
if this query is OK, but it may be.

SQL select the_geom from (SELECT SDO_GEOM.SDO_CENTROID(tt.geoloc, 2) AS 
the_geom, id
 from test_table tt) 
 WHERE SDO_ANYINTERACT(the_geom, SDO_GEOMETRY(2003, 2393, 
 NULL,SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(3289429,7024458, 
3288529,7026558)))
 = 'TRUE';

select the_geom from (SELECT SDO_GEOM.SDO_CENTROID(gp.geoloc, 2) AS the_geom, 
id from gis_polygon gp
*
VIRHE rivillä 1:  # error on row 1:
ORA-13226: interface not supported without a spatial index
ORA-06512: at MDSYS.MD, line 1723
ORA-06512: at MDSYS.MDERR, line 8
ORA-06512: at MDSYS.SDO_3GL, line 70
ORA-06512: at MDSYS.SDO_3GL, line 221

-Jukka Rahkonen-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Julian Wiersbitzki
 Lähetetty: 27. lokakuuta 2010 12:52
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Best Practices for the Spatial Index 
 with OracleDB 11gR2
 
 Hi List!
 
 I am new here in this list and with mapserver, so please tell 
 me if my question is already a faq.
 
 We have mapserver 5.6.3 in use together with an Oracle DB 
 11gR2 Standard Edtion. All works well so far and configuring 
 layer with the mapfile is no problem. But we have two layers 
 which use SDO-Function in the SELECT Statement, e.g.:
 
DATA the_geom from (SELECT 
 SDO_GEOM.SDO_CENTROID(geometrie, 2) AS the_geom, id FROM 
 ereignis) USING SRID 31468
 or
DATA the_geom from (SELECT 
 SDO_AGGR_UNION(SDOAGGRTYPE(the_geom, 0.005)) AS the_geom, 
 bezirksinspektion AS label FROM stadtbezirk GROUP BY 
 bezirksinspektion) USING SRID 31468
 
 If I want to fetch one of these layers the mapserver tells me 
 there is no spatial index. Normally we have spatial indexes 
 on all our tables with SDO_GEOMETRY columns, e.g.:
 
 INSERT INTO user_sdo_geom_metadata VALUES (
   UPPER('ereignis'),
   UPPER('geometrie'),
   MDSYS.SDO_DIM_ARRAY(
 MDSYS.SDO_DIM_ELEMENT('X',4452550.887,4479484.083,0.001),
 
 MDSYS.SDO_DIM_ELEMENT('Y',5324953.39701,5345694.05299,0.001)),
 31468);
 CREATE INDEX ereignis_geom_idx ON ereignis(geometrie) 
 INDEXTYPE IS MDSYS.SPATIAL_INDEX;
 
 But how do I create a spatial index on SDO-functions in the 
 database? Can I even do that? The documentations only 
 describes spatial index on SDO_GEOMETRY columns, but not on 
 spatial functions.
 
 What are the best practices for this kind of layers?
 
 TIA, Julian
 
 __
 
 Hamburger Berater Team GmbH   Handelsregister: HRB 31629
 Stadthausbrücke 3 (Fleethof)  Amtsgericht Hamburg
 20355 Hamburg Geschäftsführer:
 Fon:  040/369779-43   Ilse Habermann
 Fax:  040/369779-99   Hans-Joachim Habermann
 Mail: mailto:j...@hbt.de  Daniel Hoffmann
 __
 
 Internet:   http://www.hbt.de
 http://www.geofox.dehttp://www.geonetwatch.de
 __
 
 DIN EN ISO 9001:2000: DQS-Zertifikat Nr.5206 QM
 Diese Email wurde mit ständig aktualisierten Virenscannern geprüft
 __
 
 Diese Email einschließlich eventuell angehängter Dateien 
 enthält vertrauliche Informationen und ist ausschließlich 
 für den bezeichneten Adressaten bestimmt. Wenn Sie nicht 
 der richtige Adressat oder dessen Vertreter sind, verständigen 
 Sie bitte sofort den Absender und löschen Sie dann diese Email 
 und eventuell angehängte Dateien. Vielen Dank!
 Beachten Sie: Jede Form der Nutzung, Vervielfältigung oder 
 Weitergabe des Inhalts fehlgeleiteter Emails ist unzulässig.
 __
 
 This e-mail is intended only for the above addressee. 
 It may contain privileged information. If you are not the 
 addressee you must not copy, distribute, disclose or use any 
 of the information in it. If you have received it in error 
 please delete it and immediately notify the sender. 
 __
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 

Re: [mapserver-users] Maximum number of points in a poligon

2010-10-27 Thread Rahkonen Jukka
Hi,
 
All I can say is that with our data the service went all to slow for the end 
users long before jamming.  We have been splitting the biggest lake polygons 
into pieces with no more than 45000 vertises because that was the limit of 
reasonable speed in our environment.  But in that case the limiting factor was 
the database and contains queries, not Mapserver.  Anyhow, splitting the 
lakes was good for Mapserver too.  For some other layers we have made 
simplified versions for the far-away zooms. Simplifying is better for WMS use 
if polygons are drawn with different outline colour but it gives a bit more 
work with building the scale dependent layers.
 
-Jukka Rahkonen-



Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Sebastian E. Ovide
Lähetetty: 27. lokakuuta 2010 14:57
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Maximum number of points in a poligon


Hi All, 

I have a shape with 2M polygons. The biggest one has 13k points. It 
works very well, and fast enough.

I have another shape with 300k polygons and the biggest one has 800k 
points... This shape hangs MapServer !... and I have to kill the process by 
hand using kill -9. (see the other thread: process survive after killing 
apache). The shape files can be opened with ogrinfo though

Is there a maximum number of points for single polygon supported by 
MapServer ?

Thanks
-- 
Sebastian E. Ovide




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Best Practices for the Spatial Index with OracleDB 11gR2

2010-10-27 Thread Smith, Michael ERDC-CRREL-NH
You can disable the spatial filtering (which is what requires the spatial
index) by using

   DATA the_geom from (SELECT SDO_GEOM.SDO_CENTROID(geometrie, 2) AS
the_geom, id FROM ereignis) USING SRID 31468 NONE

Mike


On 10/27/10 8:14 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote:

 Hi,
 
 I made a little test and I believe it is just impossible.  Oracle cannot do
 spatial query for the transformed geometries (centroids) returned by the first
 SELECT. It cannot find where the centroids are because they are not indexed
 and the index of the primary table does not help. You can for sure use
 centroids by pushing them into a new table or column and creating spatial
 index. There may be some SQL/Oracle trick to do it in some other way, PL/SQL
 people are doing amazing things but I am not aware of any.
 
 This is the query I used for testing and Oracle messages.  I am not at all
 sure if this query is OK, but it may be.
 
 SQL select the_geom from (SELECT SDO_GEOM.SDO_CENTROID(tt.geoloc, 2) AS
 the_geom, id
  from test_table tt)
  WHERE SDO_ANYINTERACT(the_geom, SDO_GEOMETRY(2003, 2393,
  NULL,SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(3289429,7024458,
 3288529,7026558)))
  = 'TRUE';
 
 select the_geom from (SELECT SDO_GEOM.SDO_CENTROID(gp.geoloc, 2) AS the_geom,
 id from gis_polygon gp
 *
 VIRHE rivillä 1:  # error on row 1:
 ORA-13226: interface not supported without a spatial index
 ORA-06512: at MDSYS.MD, line 1723
 ORA-06512: at MDSYS.MDERR, line 8
 ORA-06512: at MDSYS.SDO_3GL, line 70
 ORA-06512: at MDSYS.SDO_3GL, line 221
 
 -Jukka Rahkonen-
 
 
 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
 Julian Wiersbitzki
 Lähetetty: 27. lokakuuta 2010 12:52
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Best Practices for the Spatial Index
 with OracleDB 11gR2
 
 Hi List!
 
 I am new here in this list and with mapserver, so please tell
 me if my question is already a faq.
 
 We have mapserver 5.6.3 in use together with an Oracle DB
 11gR2 Standard Edtion. All works well so far and configuring
 layer with the mapfile is no problem. But we have two layers
 which use SDO-Function in the SELECT Statement, e.g.:
 
DATA the_geom from (SELECT
 SDO_GEOM.SDO_CENTROID(geometrie, 2) AS the_geom, id FROM
 ereignis) USING SRID 31468
 or
DATA the_geom from (SELECT
 SDO_AGGR_UNION(SDOAGGRTYPE(the_geom, 0.005)) AS the_geom,
 bezirksinspektion AS label FROM stadtbezirk GROUP BY
 bezirksinspektion) USING SRID 31468
 
 If I want to fetch one of these layers the mapserver tells me
 there is no spatial index. Normally we have spatial indexes
 on all our tables with SDO_GEOMETRY columns, e.g.:
 
 INSERT INTO user_sdo_geom_metadata VALUES (
   UPPER('ereignis'),
   UPPER('geometrie'),
   MDSYS.SDO_DIM_ARRAY(
 MDSYS.SDO_DIM_ELEMENT('X',4452550.887,4479484.083,0.001),
 
 MDSYS.SDO_DIM_ELEMENT('Y',5324953.39701,5345694.05299,0.001)),
 31468);
 CREATE INDEX ereignis_geom_idx ON ereignis(geometrie)
 INDEXTYPE IS MDSYS.SPATIAL_INDEX;
 
 But how do I create a spatial index on SDO-functions in the
 database? Can I even do that? The documentations only
 describes spatial index on SDO_GEOMETRY columns, but not on
 spatial functions.
 
 What are the best practices for this kind of layers?
 
 TIA, Julian
 
 __
 
 Hamburger Berater Team GmbH   Handelsregister: HRB 31629
 Stadthausbrücke 3 (Fleethof)  Amtsgericht Hamburg
 20355 Hamburg Geschäftsführer:
 Fon:  040/369779-43   Ilse Habermann
 Fax:  040/369779-99   Hans-Joachim Habermann
 Mail: mailto:j...@hbt.de  Daniel Hoffmann
 __
 
 Internet:   http://www.hbt.de
 http://www.geofox.dehttp://www.geonetwatch.de
 __
 
 DIN EN ISO 9001:2000: DQS-Zertifikat Nr.5206 QM
 Diese Email wurde mit ständig aktualisierten Virenscannern geprüft
 __
 
 Diese Email einschließlich eventuell angehängter Dateien
 enthält vertrauliche Informationen und ist ausschließlich
 für den bezeichneten Adressaten bestimmt. Wenn Sie nicht
 der richtige Adressat oder dessen Vertreter sind, verständigen
 Sie bitte sofort den Absender und löschen Sie dann diese Email
 und eventuell angehängte Dateien. Vielen Dank!
 Beachten Sie: Jede Form der Nutzung, Vervielfältigung oder
 Weitergabe des Inhalts fehlgeleiteter Emails ist unzulässig.
 __
 
 This e-mail is intended only for the above addressee.
 It may contain privileged information. If you are not the
 addressee you must not copy, distribute, disclose or use any
 of the information in it. If you have received it in error
 

Re: [mapserver-users] Maximum number of points in a poligon

2010-10-27 Thread Sebastian E. Ovide
Do you spliited the polygons manually or you have some script ? perhaps
using gdal ?

On Wed, Oct 27, 2010 at 1:36 PM, Rahkonen Jukka
jukka.rahko...@mmmtike.fiwrote:

  Hi,

 All I can say is that with our data the service went all to slow for the
 end users long before jamming.  We have been splitting the biggest lake
 polygons into pieces with no more than 45000 vertises because that was the
 limit of reasonable speed in our environment.  But in that case the limiting
 factor was the database and contains queries, not Mapserver.  Anyhow,
 splitting the lakes was good for Mapserver too.  For some other layers we
 have made simplified versions for the far-away zooms. Simplifying is better
 for WMS use if polygons are drawn with different outline colour but it gives
 a bit more work with building the scale dependent layers.

 -Jukka Rahkonen-

  --
 *Lähettäjä:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *Puolesta *Sebastian E. Ovide
 *Lähetetty:* 27. lokakuuta 2010 14:57
 *Vastaanottaja:* mapserver-users@lists.osgeo.org
 *Aihe:* [mapserver-users] Maximum number of points in a poligon

 Hi All,

 I have a shape with 2M polygons. The biggest one has 13k points. It works
 very well, and fast enough.

 I have another shape with 300k polygons and the biggest one has 800k
 points... This shape hangs MapServer !... and I have to kill the process by
 hand using kill -9. (see the other thread: process survive after killing
 apache). The shape files can be opened with ogrinfo though

 Is there a maximum number of points for single polygon supported by
 MapServer ?

 Thanks
 --
 Sebastian E. Ovide





-- 
Sebastian E. Ovide
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Maximum number of points in a poligon

2010-10-27 Thread Rahkonen Jukka
Hi,
 
The biggest lake has more than 5000 islands and lots of bays and everything so 
I was thinking that a simple automatic tool would for sure break the topology, 
and sooner than I could have explained how a good tool should behave I had 
splitted the ten biggest lakes by hand. I can't even imagine how hard it would 
to be to code such a tool. It should not make invalid geometries and it should 
create new vertices so that new polygons could zigzag between the islands 
without splitting those, and the new pieces should have about same total number 
of vertices with variable number of islands. It was rather easy to iterate with 
bare eyes. 
 
-Jukka-





Lähettäjä: sebastianov...@gmail.com [mailto:sebastianov...@gmail.com] 
Puolesta Sebastian E. Ovide
Lähetetty: 27. lokakuuta 2010 16:21
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Maximum number of points in a poligon


Do you spliited the polygons manually or you have some script ? perhaps 
using gdal ?


On Wed, Oct 27, 2010 at 1:36 PM, Rahkonen Jukka 
jukka.rahko...@mmmtike.fi wrote:


Hi,
 
All I can say is that with our data the service went all to 
slow for the end users long before jamming.  We have been splitting the biggest 
lake polygons into pieces with no more than 45000 vertises because that was the 
limit of reasonable speed in our environment.  But in that case the limiting 
factor was the database and contains queries, not Mapserver.  Anyhow, 
splitting the lakes was good for Mapserver too.  For some other layers we have 
made simplified versions for the far-away zooms. Simplifying is better for WMS 
use if polygons are drawn with different outline colour but it gives a bit more 
work with building the scale dependent layers.
 
-Jukka Rahkonen-



Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Sebastian E. Ovide
Lähetetty: 27. lokakuuta 2010 14:57
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Maximum number of points in a 
poligon


Hi All, 

I have a shape with 2M polygons. The biggest one has 
13k points. It works very well, and fast enough.

I have another shape with 300k polygons and the biggest 
one has 800k points... This shape hangs MapServer !... and I have to kill the 
process by hand using kill -9. (see the other thread: process survive after 
killing apache). The shape files can be opened with ogrinfo though

Is there a maximum number of points for single polygon 
supported by MapServer ?

Thanks
-- 
Sebastian E. Ovide







-- 
Sebastian E. Ovide




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Best Practices for the Spatial Index with OracleDB 11gR2

2010-10-27 Thread Smith, Michael ERDC-CRREL-NH
When you use NONE, yes. No spatial filtering is taking place.


On 10/27/10 10:08 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote:

 Hi,
 
 Does it mean that Mapserver is making then all the Oracle queries without BBOX
 and just selects everything?
 
 -Jukka-
 
 Smith, Michael ERDC-CRREL-NH wrote
 
 Aihe: Re: [mapserver-users] Best Practices for the Spatial
 Index with OracleDB 11gR2
 
 You can disable the spatial filtering (which is what requires
 the spatial
 index) by using
 
DATA the_geom from (SELECT SDO_GEOM.SDO_CENTROID(geometrie, 2) AS
 the_geom, id FROM ereignis) USING SRID 31468 NONE
 
 Mike
 
 
 On 10/27/10 8:14 AM, Rahkonen Jukka
 jukka.rahko...@mmmtike.fi wrote:
 
 Hi,
 
 I made a little test and I believe it is just impossible.
 Oracle cannot do
 spatial query for the transformed geometries (centroids)
 returned by the first
 SELECT. It cannot find where the centroids are because they
 are not indexed
 and the index of the primary table does not help. You can
 for sure use
 centroids by pushing them into a new table or column and
 creating spatial
 index. There may be some SQL/Oracle trick to do it in some
 other way, PL/SQL
 people are doing amazing things but I am not aware of any.
 
 This is the query I used for testing and Oracle messages.
 I am not at all
 sure if this query is OK, but it may be.
 
 SQL select the_geom from (SELECT
 SDO_GEOM.SDO_CENTROID(tt.geoloc, 2) AS
 the_geom, id
  from test_table tt)
  WHERE SDO_ANYINTERACT(the_geom, SDO_GEOMETRY(2003, 2393,
  
 NULL,SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(3289429,7024458,
 3288529,7026558)))
  = 'TRUE';
 
 select the_geom from (SELECT
 SDO_GEOM.SDO_CENTROID(gp.geoloc, 2) AS the_geom,
 id from gis_polygon gp
 *
 VIRHE rivillä 1:  # error on row 1:
 ORA-13226: interface not supported without a spatial index
 ORA-06512: at MDSYS.MD, line 1723
 ORA-06512: at MDSYS.MDERR, line 8
 ORA-06512: at MDSYS.SDO_3GL, line 70
 ORA-06512: at MDSYS.SDO_3GL, line 221
 
 -Jukka Rahkonen-
 
 
 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
 Julian Wiersbitzki
 Lähetetty: 27. lokakuuta 2010 12:52
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Best Practices for the Spatial Index
 with OracleDB 11gR2
 
 Hi List!
 
 I am new here in this list and with mapserver, so please tell
 me if my question is already a faq.
 
 We have mapserver 5.6.3 in use together with an Oracle DB
 11gR2 Standard Edtion. All works well so far and configuring
 layer with the mapfile is no problem. But we have two layers
 which use SDO-Function in the SELECT Statement, e.g.:
 
DATA the_geom from (SELECT
 SDO_GEOM.SDO_CENTROID(geometrie, 2) AS the_geom, id FROM
 ereignis) USING SRID 31468
 or
DATA the_geom from (SELECT
 SDO_AGGR_UNION(SDOAGGRTYPE(the_geom, 0.005)) AS the_geom,
 bezirksinspektion AS label FROM stadtbezirk GROUP BY
 bezirksinspektion) USING SRID 31468
 
 If I want to fetch one of these layers the mapserver tells me
 there is no spatial index. Normally we have spatial indexes
 on all our tables with SDO_GEOMETRY columns, e.g.:
 
 INSERT INTO user_sdo_geom_metadata VALUES (
   UPPER('ereignis'),
   UPPER('geometrie'),
   MDSYS.SDO_DIM_ARRAY(
 MDSYS.SDO_DIM_ELEMENT('X',4452550.887,4479484.083,0.001),
 
 
 MDSYS.SDO_DIM_ELEMENT('Y',5324953.39701,5345694.05299,0.001)),
 31468);
 CREATE INDEX ereignis_geom_idx ON ereignis(geometrie)
 INDEXTYPE IS MDSYS.SPATIAL_INDEX;
 
 But how do I create a spatial index on SDO-functions in the
 database? Can I even do that? The documentations only
 describes spatial index on SDO_GEOMETRY columns, but not on
 spatial functions.
 
 What are the best practices for this kind of layers?
 
 TIA, Julian
 
 __
 
 Hamburger Berater Team GmbH   Handelsregister: HRB 31629
 Stadthausbrücke 3 (Fleethof)  Amtsgericht Hamburg
 20355 Hamburg Geschäftsführer:
 Fon:  040/369779-43   Ilse Habermann
 Fax:  040/369779-99   Hans-Joachim Habermann
 Mail: mailto:j...@hbt.de  Daniel Hoffmann
 __
 
 Internet:   http://www.hbt.de
 http://www.geofox.dehttp://www.geonetwatch.de
 __
 
 DIN EN ISO 9001:2000: DQS-Zertifikat Nr.5206 QM
 Diese Email wurde mit ständig aktualisierten Virenscannern geprüft
 __
 
 Diese Email einschließlich eventuell angehängter Dateien
 enthält vertrauliche Informationen und ist ausschließlich
 für den bezeichneten Adressaten bestimmt. Wenn Sie nicht
 der richtige Adressat oder dessen Vertreter sind, verständigen
 Sie bitte sofort den Absender und löschen Sie dann diese Email
 und eventuell angehängte Dateien. Vielen Dank!
 Beachten 

[mapserver-users] Class status (does it toggle?)

2010-10-27 Thread nikos
Hi,

More a'do

Is there anything special I have to do to toggle class names off and on?
I added status OFF for some classes in the mapfile, but the classes still
render??? Layer status is ON

I'm figuring I repeatedly define the same layer with different class and
toggle LYER status, that, but then what's the point of a CLASS status???

snip of mapfile again...

DATA the_geom FROM (SELECT landunits.gid AS gid, landunits.the_geom AS
the_geom,
im_results.cot as cotton,
im_results.ble as wheat,
im_results.cyna as cynara,
im_results.misc as miscanthus
FROM landunits JOIN im_results ON
landunits.gid = im_results.ide1)
AS im_join USING UNIQUE gid USING SRID=-1
#
##
#FILTER gid  0

  CLASS
  Name landunits
OUTLINECOLOR 10 10 10
color 255 125 0
outlinecolor 25 25 255
template templates/landunits_query.html
  END
CLASS
  Name gid
OUTLINECOLOR 10 10 10
color 255 12 0
outlinecolor 25 25 255
template templates/landunits_query.html
  END
Class
Name cotton
OUTLINECOLOR 10 10 10
color 255 125 0
outlinecolor 25 25 255
template templates/landunits_query.html
STATUS OFF


regards,

nikos

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users