[Mapserver-users] Oracle Spatial extents
Fernando S.
simon at inf.univali.br
Wed Feb 18 09:38:05 PST 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>
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>
SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada,
m.diminfo, 1) AS X2<br>
, SDO_GEOM.SDO_MAX_MBR_ORDINATE(h.coordenada,
m.diminfo, 2) AS Y2<br>
, SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada,
m.diminfo, 1) AS X1<br>
, SDO_GEOM.SDO_MIN_MBR_ORDINATE(h.coordenada,
m.diminfo, 2) as Y1<br>
, h.codigo_ott<br>
, h.codigo_dna <br>
FROM hidrografia_sc h, user_sdo_geom_metadata m <br>
WHERE m.table_name ='HIDROGRAFIA_SC' <br>
AND m.column_name = 'COORDENADA' <br>
AND h.codigo_ott = $CODE)<br>
<br>
In this query HIDROGRAFIA_SC is the table that contains the
geometry column (COORDENADA). The $CODE is the unique identyfier of
table.<br>
<br>
This query report:<br>
MAX(X2) MAX(Y2) MIN(X1) MIN(Y1)<br>
---------- ---------- ---------- ----------<br>
-48.64248 -26.83385 -49.69149 -27.24407<br>
<br>
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ório de Computaçã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á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