[Mapserver-users] Oracle Spatial extents

Fernando S. simon at inf.univali.br
Wed Feb 18 12:38:05 EST 2004


This is a multi-part message in MIME format.
--------------000104030108090908030902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Vladimir,
    Hi, concerning this function, I don't know if this is the correct 
way to do it. Anyway I use this query to get the extent:
SELECT max(X2), max(Y2), min(X1), min(Y1) FROM (
            SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada, 
m.diminfo, 1) AS X2
                , SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada, m.diminfo, 
2) AS Y2
                , SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada, m.diminfo, 
1) AS X1
                , SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada, m.diminfo, 
2) as Y1
                , h.codigo_ott
                , h.codigo_dna
            FROM hidrografia_sc h, user_sdo_geom_metadata m
            WHERE m.table_name ='HIDROGRAFIA_SC'
            AND m.column_name = 'COORDENADA'
            AND h.codigo_ott = $CODE)

    In this query HIDROGRAFIA_SC is the table that contains the geometry 
column (COORDENADA).  The $CODE is the unique identyfier of table.

    This query report:
   MAX(X2)    MAX(Y2)    MIN(X1)    MIN(Y1)
    ----------      ----------        ----------      ----------
 -48.64248  -26.83385    -49.69149   -27.24407

    I don't know if I help you. Sorry my poor english.


==================================================================
Fernando Simon - simon at cttmar.univali.br <mailto:simon at cttmar.univali.br>
==================================================================
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
G10 - Laboratório de Computação Aplicada
Fone: 047 - 341 7960
http://g10.cttmar.univali.br
==================================================================


Vladimir Guzmán wrote:

> Yes, but the information I get from the table USER_SDO_GEOM_METADATA 
> is the global extents of all the elements in the table, and I need the 
> extents of each particular element in the table.
> For example, my table contains information about states, and if the 
> user selects one state in a combo box, I need to get this particular 
> state's extents in order to draw it with its appropiate zoom.
>
> Any ideas?
>
> Thanks


--------------000104030108090908030902
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body>
Vladimir,<br>
&nbsp;&nbsp;&nbsp; Hi, concerning this function, I don't know if this is the correct
way to do it. Anyway I use this query to get the extent:<br>
SELECT max(X2), max(Y2), min(X1), min(Y1) FROM (<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada,
m.diminfo, 1) AS X2<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada,
m.diminfo, 2) AS Y2<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada,
m.diminfo, 1) AS X1<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada,
m.diminfo, 2) as Y1<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , h.codigo_ott<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; , h.codigo_dna <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FROM hidrografia_sc h, user_sdo_geom_metadata m <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WHERE m.table_name ='HIDROGRAFIA_SC' <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AND m.column_name = 'COORDENADA' <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AND h.codigo_ott = $CODE)<br>
<br>
&nbsp;&nbsp;&nbsp; In this query HIDROGRAFIA_SC is the table that contains the
geometry column (COORDENADA).&nbsp; The $CODE is the unique identyfier of
table.<br>
<br>
&nbsp;&nbsp;&nbsp; This query report:<br>
&nbsp;&nbsp; MAX(X2)&nbsp;&nbsp;&nbsp; MAX(Y2)&nbsp;&nbsp;&nbsp; MIN(X1)&nbsp;&nbsp;&nbsp; MIN(Y1)<br>
&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------<br>
&nbsp;-48.64248&nbsp; -26.83385&nbsp;&nbsp;&nbsp; -49.69149&nbsp;&nbsp; -27.24407<br>
<br>
&nbsp;&nbsp;&nbsp; I don't know if I help you. Sorry my poor english.<span
 style="font-size: 10pt; font-family: Arial;"><br>
</span><font size="2" face="Arial"><span
 style="font-size: 10pt; font-family: Arial;"><br>
<br>
==================================================================
<br>
Fernando Simon - <a href="mailto:simon at cttmar.univali.br">simon at cttmar.univali.br</a>
<br>
================================================================== <br>
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer <br>
G10 - Laborat&oacute;rio de Computa&ccedil;&atilde;o Aplicada <br>
Fone: 047 - 341 7960 <br>
<a href="http://g10.cttmar.univali.br">http://g10.cttmar.univali.br</a>
<br>
================================================================== </span></font><br>
<br>
<br>
Vladimir Guzm&aacute;n wrote:
<blockquote cite="mid403396D5.1050702 at main-task.com" type="cite">Yes,
but the information I get from the table USER_SDO_GEOM_METADATA is the
global extents of all the elements in the table, and I need the extents
of each particular element in the table.
  <br>
For example, my table contains information about states, and if the
user selects one state in a combo box, I need to get this particular
state's extents in order to draw it with its appropiate zoom.
  <br>
  <br>
Any ideas?
  <br>
  <br>
Thanks<br>
</blockquote>
</body>
</html>

--------------000104030108090908030902--



More information about the mapserver-users mailing list