[Mapserver-users] Dynamically change FILTER object using OGR connection to Oracle Spatial

Smith, Michael ERDC-CRREL-NH Michael.Smith at erdc.usace.army.mil
Fri Jul 2 03:15:23 PDT 2004


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C4601D.2A11C624
Content-Type: text/plain

I does work with connection type ORACLESPATIAL, I haven't tried OGR. I think
in either case though you wouldn't need /'s on either side since it is just
passing a where predicate.Try it as
mapserv?map=mars.map&layer=surveys&template=frame_map.html&map_surveys_filte
r=51397
 
Mike
Michael Smith
GIS Specialist/Physical Scientist
ERDC/RSGIS Center of Expertise
US Army Corps of Engineers
Hanover, NH
(603) 646-4765
michael.smith at erdc.usace.army.mil 

-----Original Message-----
From: Geoffrey.Tuckerman at ga.gov.au [mailto:Geoffrey.Tuckerman at ga.gov.au] 
Sent: Friday, July 02, 2004 1:06 AM
To: mapserver-users at lists.gis.umn.edu
Cc: Trevor.Tracey-Patte at ga.gov.au; Geoffrey.Tuckerman at ga.gov.au
Subject: [Mapserver-users] Dynamically change FILTER object using OGR
connection to Oracle Spatial



We currently can dynamically change the FILTER object in the map file when
using a shapefile, however when we use the same code to change the FILTER
object when connected to an Oracle database it doesn't do anything. The
FILTER object is being used to draw the map if you hard code the FILTERITEM
and FILTER objects in the map file (and displays correctly) but nothing
happens at all when it is changed dynamically.

 

Eg in the map file the following displays the two geometries for the enos
given. The connection type is OGR to an Oracle database with the DATA object
being an SQL statement to select the geometry field and a unique number (ie
eno) identifying the row. LAYER "surveys" FILTERITEM "eno" FILTER
/51378|51397/

 

But when we use the dynamic call
"mapserv?map=mars.map&layer=surveys&template=frame_map.html&map_surveys_filt
er=/51397/", it continues to draw both the geometries given in the map file
and not draw only the geometry given in the call above.

 

Does anyone know if changing the FILTER object dynamically only works when
the data is coming from a shapefile? 

Or does it work direct from the database but we have it wrong somehow?

 

 

 


------_=_NextPart_001_01C4601D.2A11C624
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE>@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
	COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-AU vLink=purple link=blue>
<DIV><SPAN class=320051310-02072004><FONT face=Arial color=#0000ff size=2>I does 
work with connection type ORACLESPATIAL, I haven't tried OGR. I think in either 
case though you wouldn't need /'s on either side since it is just passing a 
where predicate.Try it as <FONT face="Courier New" 
color=#000000>mapserv?map=mars.map&layer=surveys&template=frame_map.html&map_surveys_filter=51397</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=320051310-02072004><FONT face="Courier New" 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=320051310-02072004><FONT face="Courier New" 
size=2>Mike</FONT></SPAN></DIV>
<DIV><SPAN class=320051310-02072004><!-- Converted from text/plain format -->
<P><FONT size=2>Michael Smith<BR>GIS Specialist/Physical Scientist<BR>ERDC/RSGIS 
Center of Expertise<BR>US Army Corps of Engineers<BR>Hanover, NH<BR>(603) 
646-4765<BR>michael.smith at erdc.usace.army.mil</FONT> </P></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  Geoffrey.Tuckerman at ga.gov.au [mailto:Geoffrey.Tuckerman at ga.gov.au] 
  <BR><B>Sent:</B> Friday, July 02, 2004 1:06 AM<BR><B>To:</B> 
  mapserver-users at lists.gis.umn.edu<BR><B>Cc:</B> Trevor.Tracey-Patte at ga.gov.au; 
  Geoffrey.Tuckerman at ga.gov.au<BR><B>Subject:</B> [Mapserver-users] Dynamically 
  change FILTER object using OGR connection to Oracle 
  Spatial<BR><BR></FONT></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">We currently can 
  dynamically change the FILTER object in the map file when using a shapefile, 
  however when we use the same code to change the FILTER object when connected 
  to an Oracle database it doesn't do anything. The FILTER object is being used 
  to draw the map if you hard code the FILTERITEM and FILTER objects in the map 
  file (and displays correctly) but nothing happens at all when it is changed 
  dynamically.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Eg in the map file the 
  following displays the two geometries for the enos given. The connection type 
  is OGR to an Oracle database with the DATA object being an SQL statement to 
  select the geometry field and a unique number (ie eno) identifying the row. 
  LAYER "surveys" FILTERITEM "eno" FILTER /51378|51397/</SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">But when we use the 
  dynamic call 
  "mapserv?map=mars.map&layer=surveys&template=frame_map.html&map_surveys_filter=/51397/", 
  it continues to draw both the geometries given in the map file and not draw 
  only the geometry given in the call above.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Does anyone know if 
  changing the FILTER object dynamically only works when the data is coming from 
  a shapefile? </SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Or does it work direct 
  from the database but we have it wrong somehow?</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
  <P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face="Times New Roman" 
  size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C4601D.2A11C624--



More information about the MapServer-users mailing list