Re: [MAPSERVER-USERS] mssql2008 binary test package available to download

2008-10-16 Thread BrainDrain

ok
Now without mixing your package contens with older (ms4w_2.3.0 release)
dll's:
(I've attach my test database backup 
http://www.nabble.com/file/p20008430/geodb.zip geodb.zip )

-without "WITH(INDEX..." in mapfile data section - mem corruption exception
on "shape = layer.getFeature(featureIndexe, -1)" after successful execution
of queryByPoint (querying the largest polygon in my geodb);
-with using "WITH(INDEX...": 
msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL
statement: select convert(varchar(max), STATUS),convert(varchar(max),
STAGE),convert(varchar(max), id),GEOM from dbo.Construct
WITH(INDEX(SIndx_Construct_geometry_geom)) where id = 190748
-[Microsoft][ODBC SQL Server Driver][SQL Server]Query processor could not
produce a query plan because of the hints defined in this query. Resubmit
the query without specifying any hints and without using SET FORCEPLAN.
When I'm trying to execute this select statement in man. studio - error
message - the same.
I think because where clause don't contains conditions related to spatial
index used in 'WITH' hint.
OS: win2003 server std. sp2
My map file below:
 NAME "test map"
 STATUS ON
 CONFIG "PROJ_LIB" "c:/ms4w/app/WEMSite/Bin/proj/" 
 IMAGETYPE AGG_Q  
 IMAGECOLOR 255 255 255 
 EXTENT 24901 -5431142 67371 -5377561 
 SIZE 256 256
 FONTSET "../etc/fonts.fnt"
 SYMBOLSET "../etc/symbols.sym"   
 SHAPEPATH "../data" 
 UNITS meters 
 PROJECTION 
"+proj=tmerc +lat_0=48.70975 +lon_0=44.51205 +k=1.00 +x_0=0 +y_0=0
+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0,0,0 +units=m +no_defs"
 END 
 QUERYMAP  
  STATUS OFF  
  STYLE HILITE  
 END
 REFERENCE
  STATUS ON
  IMAGE refmap.jpg
  SIZE 120 80
  EXTENT -29603.5500 -33673.0980 13062.3500 19954.7270 
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
 END 
 LEGEND 
  STATUS OFF
  KEYSIZE 16 16
  LABEL
   TYPE TRUETYPE
   FONT ninab
   COLOR 0 0 0
   SIZE 12   
  END
 END
 
 WEB
  LOG cicbase.log  
  IMAGEPATH "../tmp/"
  IMAGEURL "/tmp/"
  EXTENT -16000.0 -3.0 19000.0 22500.0
  MINSCALE 1
  MAXSCALE 40  
 END

LAYER
 NAME "construct"
 TYPE POLYGON 
 CONNECTIONTYPE PLUGIN
 PLUGIN "c:/ms4w/app/WEMSite/Bin/plugins/mssql/msplugin_mssql2008.dll"
 #CONNECTION "server=localhost;database=geodb;Integrated Security=true"
 CONNECTION
"server=localhost;uid=wem;pwd=spatialware;database=geodb;Integrated
Security=false"
 DATA "GEOM from dbo.Construct WITH(INDEX(SIndx_Construct_geometry_geom))
USING UNIQUE id USING SRID=0"
 #DATA "GEOM from dbo.Construct USING UNIQUE id USING SRID=0" 
 #PROCESSING "CLOSE_CONNECTION=DEFER" 
 TEMPLATE " " 
 STATUS ON
 TRANSPARENCY 100 #75
 TOLERANCE 12
 TOLERANCEUNITS pixels 
 #MAXSCALE 6000 
 PROJECTION
"+proj=tmerc +lat_0=0 +lon_0=45 +k=1.00 +x_0=0 +y_0=0 +ellps=krass
+towgs84=23.92,-141.27,-80.9,0,0,0,0 +units=mm +no_defs"
 END 
 CLASS
  NAME "Здания, сооружения"  
  STYLE
   COLOR 150 150 150
   OUTLINECOLOR 0 0 0
  END
 END 
END

IMAGEQUALITY 100
OUTPUTFORMAT
  NAME "AGG_Q"
  DRIVER "AGG/PNG"
  MIMETYPE "image/png; mode=8bit"
  IMAGEMODE RGB
  EXTENSION "png" 
  FORMATOPTION "QUANTIZE_FORCE=ON"
  FORMATOPTION "QUANTIZE_DITHER=OFF"  
  FORMATOPTION "QUANTIZE_COLORS=256"  
END

END


Tamas Szekeres wrote:
> 
> Hi,
> 
> I'm afraid I'd require further information about your environment,
> mapfiles, sample scripts to reproduce this problem.
> I've installed the binaries either with IIS and Apache but I haven't
> run into this problem, however I didn't mix the dll-s with other
> installations.
> 
> Here's a link to my installation displaying a single layer in IIS:
> http://vbkto.dyndns.org:1280/cgi-bin/mapserv.exe?mode=map&map=sql2008.map
> 
> And the same files working in Apache:
> http://vbkto.dyndns.org:1080/cgi-bin/mapserv.exe?mode=map&map=sql2008.map
> 
> The corresponding mapfile is looking something like:
> 
> MAP
>   NAME "SQL2008"
>   STATUS ON
>   EXTENT 50 30 54 34
>   SIZE 1000 1000
>   IMAGETYPE PNG
>   IMAGECOLOR 254 254 254
>   PROJECTION
>   "proj=somerc"
>   "lat_0=47.1443937222"
>   "lon_0=19.0485717778"
>   "x_0=65"
>   "y_0=20"
>   "ellps=GRS67"
>   "units=m"
>   "no_defs"
>   END
>   SCALEBAR
>   TRANSPARENT ON
>   COLOR 0 0 64
>   STATUS EMBED
>   POSITION LR
>   STYLE 1
>   UNITS kilometers
>   LABEL
>   SIZE medium
>   COLOR 0 0 64
>   END
>   END
> 
> 
> 
>   LAYER   
>   PROJECTION
>   "proj=somerc"
>   "lat_0=47.1443937222"
>   "lon_0=19.0485717778"
>   "x_0=65"
>   "y_0=20"
>   "ellps=GRS67"
>   "units=m"
>   "no_defs"
>   E

RE [mapserver-users] Map is OK with shp2img but blank with CGI

2008-10-16 Thread Steve . Toutant
Is it a WMS layer? Maybe your problem is similar as mine...and I didn't 
find a solution yet.
Steve
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[MAPSERVER-USERS] Query using template and WFS errorred on POSTGIS

2008-10-16 Thread G. Tiemens

Hello List,

I want to try to get certain features-attribute information back from my
postgis database via Mapserver.

I tried this in 2 ways:
Enabeling WFS in the mapfile and making a query layer.

Both requests generate errors on the Postgis Database and i can't discover
what is going wrong.

This is the error I get: 
DECLARE CURSOR can only be used in transaction blocks

When doing a WFS request, i get a bounding box (envelope), but no features
back
Error is in the logfile of the postgis.

When doing a Query (nquery)  i get the error in html back:
Content-type: text/html writeLog(): Unable to access file. hierzo.log
msPOSTGISLayerGetShape(): Query error. Error executing POSTGIS SQL statement
(in FETCH ALL): DECLARE mycursor2 BINARY CURSOR FOR SELECT
"gid"::text,"provincie"::text,"oid"::text,asbinary(force_collection(force_2d(the_geom)),'NDR')
from prov2007 WHERE OID = 1 -ERROR: DECLARE CURSOR can only be used in
transaction blocks More Help: msPOSTGISLayerRetrievePGVersion(): Query
error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) msPOSTGISLayerRetrievePGVersion(): Query
error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) msPOSTGISLayerRetrievePGVersion(): Query
error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) msPOSTGISLayerRetrievePGVersion(): Query
error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) msPOSTGISLayerRetrievePGVersion(): Query
error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) 


Both queries are also done with shapefile data, and that works fine. I get
features back (wfs) or the template (nquery) is filled in correctly


Below the parts of my mapfile and templates.

Mapfile: 
LAYER NAME 'pr2007' TYPE POLYGON CONNECTIONTYPE postgis
CONNECTION 'host=127.0.0.1 user=* dbname=*' DATA 'the_geom FROM
pr2007' #DATA 'C:\Project\Downloads\OSM\Data\pr\pr2007' PROCESSING
"CLOSE_CONNECTION=DEFER"METADATA   'ows_title' 'prov2007'
"ows_abstract" "" "ows_keywordlist" """gml_featureid" "gid" ##
REQUIRED  "gml_include_items" "all"  ## Optional (serves all attributes
for layer)"ows_srs" "EPSG:28992" # "queryable" "true"
"wfs_geometry_element_name" "the_geom""wfs_extent" "12500 38 28
55"  END#DUMP TRUE STATUS ON #DEFAULT #opacity 100
PROJECTION  "init=epsg:28992" END   HEADER 
"imapheader.html"FOOTER
"imapfooter.html"   CLASS   COLOR 0 0 0 TEMPLATE 
"bodytemplate.html" 
END   END


query template:
http://www.*.nl/pr.hml?ID=[pr]>



Versions i use:
PostgreSQL + postgis 8.3
Mapserver:  MS4W :  5.2.0
Or FWtools:  5.3-dev

All on localhost, so no firewall/security issues whatsoever.


What is the possible mistake i make? Any possible plugins or settings wrong
in database?


Greetings and thanks for help.

Gerben



-- 
View this message in context: 
http://www.nabble.com/Query-using-template-and-WFS-errorred-on-POSTGIS-tp20012197p20012197.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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


Re: [mapserver-users] Map is OK with shp2img but blank with CGI

2008-10-16 Thread Benoît Andrieu

Hi,

which version of mapserver are you using ?

In the actual version, and as expected from the specifications, some 
parameters are mandatory such as :

width, height
srs
styles
version
request

But maybe I am wrong and the mode=map is doing something else..

Hope it helps !!

Benoît Andrieu

- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, October 15, 2008 4:51 PM
Subject: [mapserver-users] Map is OK with shp2img but blank with CGI



Hi list !

I am very very new to mapserver, so please forgive me if I missed 
something stupid.
I've read the most important parts of the documentation (CGI reference and 
MapFile reference), so I am starting to get it, but I have a strange 
problem.


I installed mapserver on my own computer.
I created a basic mapfile, with only two layers. One is a RASTER layer, 
the other one a POSTGIS layer.


If I run
shp2img -m D:\mymap.map -o D:\test.png
it runs OK, the image is created and the content is good (so EXTENT and 
SIZE are good).


Now, if I open my browser and go to
http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=D:\mymap.map&mode=map
all I get is a blank image. The size of the image is OK (it is the size I 
specified in the mapfile).


I tried with the command line equivalent (mapserv -nh 
"QUERYSTRING=map=map=D:\mymap.map&mode=map" blank image.


I have activated DEBUG on MAP level an both LAYER levels, but all I get in 
the debug file are lines saying "[Wed Oct 15 16:49:01 2008].37 CGI 
Request 1 on process 3316" etc...



Now, I really don't know what I should try next...
Does anyone know what I did wrong here ?

Thanks a lot for helping !

--
Arnaud Lesauvage

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


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


Re: RE : [mapserver-users] Symbol...

2008-10-16 Thread Paul james
Thanks, but It does not help me in that case...


2008/10/16 Léveillé, James <[EMAIL PROTECTED]>

>  See http://mapserver.gis.umn.edu/docs/howto/cartosymbols
>
>
>
> __
>
> *JAMES LÉVEILLÉ
> *Service des systèmes de Mission
> Direction des technologies de l'information
> Ministère des Transports du Québec
>
> 5833, boul. Pierre-Bertrand, 2ième étage
> Québec (Québec) G2K 1K7
> Téléphone:   (418) 380-2005 poste 227
> Télécopieur: (418) 644-6653
> [EMAIL PROTECTED]
>
>
>
>  -Message d'origine-
> *De :* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *De la part de* Paul james
> *Envoyé :* 16 octobre 2008 09:07
> *À :* mapserver-users@lists.osgeo.org
> *Objet :* [mapserver-users] Symbol...
>
> Hello guys...
> How can I do that symbol :
> ___
> - - - - - - - - - -
>
> Thanks
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: RE : [mapserver-users] Symbol...

2008-10-16 Thread thomas bonfort
this should do it:

SYMBOL
NAME dash
PATTERN 3 3 END
TYPE SIMPLE
END

STYLE
 COLOR 0 0 0
 WIDTH 1
END
STYLE
 SYMBOL dash
 WIDTH 1
 COLOR 0 0 0
 OFFSET 3 -99
END

--
thomas

2008/10/16 Paul james <[EMAIL PROTECTED]>:
> Thanks, but It does not help me in that case...
>
>
> 2008/10/16 Léveillé, James <[EMAIL PROTECTED]>
>>
>> See http://mapserver.gis.umn.edu/docs/howto/cartosymbols
>>
>>
>>
>> __
>>
>> JAMES LÉVEILLÉ
>> Service des systèmes de Mission
>> Direction des technologies de l'information
>> Ministère des Transports du Québec
>>
>> 5833, boul. Pierre-Bertrand, 2ième étage
>> Québec (Québec) G2K 1K7
>> Téléphone:   (418) 380-2005 poste 227
>> Télécopieur: (418) 644-6653
>> [EMAIL PROTECTED]
>>
>>
>>
>> -Message d'origine-
>> De : [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] De la part de Paul james
>> Envoyé : 16 octobre 2008 09:07
>> À : mapserver-users@lists.osgeo.org
>> Objet : [mapserver-users] Symbol...
>>
>> Hello guys...
>> How can I do that symbol :
>> ___
>> - - - - - - - - - -
>>
>> Thanks
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MAPSERVER-USERS] Query using template and WFS errorred on POSTGIS

2008-10-16 Thread Tellett

Hi Gerben, not sure if this is the reason why but I noticed that 
under the layer block you set Data as ' DATA 'the_geom FROM pr2007'  ', 
I think you need a "USING UNIQUE"  clause in there to specify 
which column in the table can act as a unique identifier and maybe an 
srid clause as well to specify the projection of the postgis table. 

For instance USING UNIQUE  ogc_fid  USING SRID =32633. 
(Where ogc_fid is the unique identifier in my postgis table and 32633 is
the EPSG code of the table data)
Try appending these clauses to the 'Data' line in your layer block 
and see what happens.



G. Tiemens wrote:
> 
> Hello List,
> 
> I want to try to get certain features-attribute information back from my
> postgis database via Mapserver.
> 
> I tried this in 2 ways:
> Enabeling WFS in the mapfile and making a query layer.
> 
> Both requests generate errors on the Postgis Database and i can't discover
> what is going wrong.
> 
> 
> 
> Both queries are also done with shapefile data, and that works fine. I get
> features back (wfs) or the template (nquery) is filled in correctly
> 
> 
> Below the parts of my mapfile and templates.
> 
> Mapfile: 
> LAYER NAME 'pr2007' TYPE POLYGON CONNECTIONTYPE postgis
> CONNECTION 'host=127.0.0.1 user=* dbname=*' DATA 'the_geom
> FROM pr2007' #DATA 'C:\Project\Downloads\OSM\Data\pr\pr2007'
> PROCESSING "CLOSE_CONNECTION=DEFER"   METADATA   'ows_title'
> 'prov2007'  "ows_abstract" ""   "ows_keywordlist" ""
> "gml_featureid"
> "gid" ## REQUIRED   "gml_include_items" "all"  ## Optional (serves all
> attributes for layer)   "ows_srs" "EPSG:28992" # "queryable" 
> "true"
> "wfs_geometry_element_name" "the_geom"  "wfs_extent" "12500 38
> 28 55"  END   #DUMP TRUE STATUS ON #DEFAULT #opacity
> 100 PROJECTION"init=epsg:28992" END   HEADER 
> "imapheader.html" 
> FOOTER "imapfooter.html"  CLASS   COLOR 0 0 0 TEMPLATE
> "bodytemplate.html"   END   END
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Query-using-template-and-WFS-errorred-on-POSTGIS-tp20012197p20014232.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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


RE : [mapserver-users] Symbol...

2008-10-16 Thread Léveillé , James
See http://mapserver.gis.umn.edu/docs/howto/cartosymbols
 
 

__

JAMES LÉVEILLÉ
Service des systèmes de Mission
Direction des technologies de l'information
Ministère des Transports du Québec

5833, boul. Pierre-Bertrand, 2ième étage
Québec (Québec) G2K 1K7
Téléphone:   (418) 380-2005 poste 227
Télécopieur: (418) 644-6653
[EMAIL PROTECTED]  


 

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Paul james
Envoyé : 16 octobre 2008 09:07
À : mapserver-users@lists.osgeo.org
Objet : [mapserver-users] Symbol...


Hello guys...
How can I do that symbol :
___
- - - - - - - - - -

Thanks


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


[mapserver-users] examples of Web GIS interaction between citizens and governments?

2008-10-16 Thread M. Fioretti
Greetings,

Many state and local Public Administrations around the world use Open
Source GIS software to present their geographic data through the
Internet. Most of those websites, however, are one-way only. The end
user can navigate through a digital map, zoom, unzoom, select layers
and so on... but he or she cannot use the system to directly
_communicate_ geographic-related information to the Public
Administration which created that website.

I am thinking to any kind of things like

"click on this map wherever you have seen an abusive dumpster/polluted
springs/ill trees/ whatever, enter a short explanation in the form
which will pop up and the server will immediately send that comment
via email to the police station closer to that point and put a link to
your comment on the map itself"

Do you know of any website of this kind? the reason I'm asking is both
to write an article on this and to add such examples to a generic
presentation about "GIS for local public administrations" I have to
give next month.

Thank you in advance for any input.

Best Regards,
  Marco Fioretti

-- 
Your own civil rights and the quality of your life heavily depend on how
software is used *around* you:http://digifreedom.net/node/84
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [MAPSERVER-USERS] Query using template and WFS errorred on POSTGIS

2008-10-16 Thread Tiemens, Gerben
Hello Thomas,

Thanks for your answer,

It was sure the right answer. I did try it with unique, but forgot the srid.  
It works now for both query and wfs.
Strange that WMS and just type=map requests will work without these unique and 
srid statements.

Thanks!


Gerben Tiemens



-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Tellett
Verzonden: Thursday, October 16, 2008 4:00 PM
Aan: mapserver-users@lists.osgeo.org
Onderwerp: Re: [MAPSERVER-USERS] Query using template and WFS errorred on 
POSTGIS


Hi Gerben, not sure if this is the reason why but I noticed that under the 
layer block you set Data as ' DATA 'the_geom FROM pr2007'  ', I think you need 
a "USING UNIQUE"  clause in there to specify which column in the table can act 
as a unique identifier and maybe an srid clause as well to specify the 
projection of the postgis table.

For instance USING UNIQUE  ogc_fid  USING SRID =32633.
(Where ogc_fid is the unique identifier in my postgis table and 32633 is the 
EPSG code of the table data) Try appending these clauses to the 'Data' line in 
your layer block and see what happens.



G. Tiemens wrote:
>
> Hello List,
>
> I want to try to get certain features-attribute information back from
> my postgis database via Mapserver.
>
> I tried this in 2 ways:
> Enabeling WFS in the mapfile and making a query layer.
>
> Both requests generate errors on the Postgis Database and i can't
> discover what is going wrong.
>
>
>
> Both queries are also done with shapefile data, and that works fine. I
> get features back (wfs) or the template (nquery) is filled in
> correctly
>
>
> Below the parts of my mapfile and templates.
>
> Mapfile:
> LAYER NAME 'pr2007' TYPE POLYGON CONNECTIONTYPE postgis
> CONNECTION 'host=127.0.0.1 user=* dbname=*' DATA 'the_geom
> FROM pr2007' #DATA 'C:\Project\Downloads\OSM\Data\pr\pr2007'
> PROCESSING "CLOSE_CONNECTION=DEFER"   METADATA   'ows_title'
> 'prov2007'  "ows_abstract" ""   "ows_keywordlist" ""
> "gml_featureid"
> "gid" ## REQUIRED   "gml_include_items" "all"  ## Optional (serves all
> attributes for layer)   "ows_srs" "EPSG:28992" # "queryable" 
> "true"
> "wfs_geometry_element_name" "the_geom"  "wfs_extent" "12500 38
> 28 55"  END   #DUMP TRUE STATUS ON #DEFAULT #opacity
> 100 PROJECTION"init=epsg:28992" END   HEADER 
> "imapheader.html"
> FOOTER "imapfooter.html"  CLASS   COLOR 0 0 0 TEMPLATE
> "bodytemplate.html"   END   END
>
>
>
>
>
>

--
View this message in context: 
http://www.nabble.com/Query-using-template-and-WFS-errorred-on-POSTGIS-tp20012197p20014232.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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

<< Please read our E-mail Disclaimer at the Grontmij Corporate website >>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Symbol...

2008-10-16 Thread Paul james
Hello guys...
How can I do that symbol :
___
- - - - - - - - - -

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


[mapserver-users] Spatial Query problem with ODBC layer

2008-10-16 Thread Emerson, Gabe
I recently switched one of my layers from a static shapefile to an ODBC
SQL connection. The data points are correctly displayed on the map, but
when I use the "query" or "nquery" modes, I get results that don't
correspond at all to the clicked point. I tend to get the same set of
points, in various orders, none of which are anywhere near eachother and
all outside the tolerance of the query. 

I'm assuming the problem is projection related, but I'm stumped as to
how to fix it. Do I need a  entry in my OVF file? I left it
out since it was causing problems, and I read that it was unnecessary if
a projection is defined in the layer. If  is needed, how
should I use it? I tried setting it to WGS84 and NAD83, both caused my
points to float in the Caribbean. I've seen EPSG codes used in example
OVF files, but I got an error when I tried that.

Here's my ODBC layer:

LAYER
NAME "brokerage"
STATUS off
TYPE POINT
DATA "GIS"
UNITS DD
CONNECTION "eBrochure_XY.ovf"
CONNECTIONTYPE OGR
PROJECTION
   "init=epsg:4326"
END
  METADATA
"wms_srs"   "4326"
"wms_title"   "coal-test"
  END
HEADER "../local/brokerage_header.html"
FOOTER "../local/layer_footer.html"
TOLERANCE 25
TOLERANCEUNITS pixels
CLASSITEM "P_PropertyType"
LABELITEM "P_Name"

 ## -- Various class definitions left out -- ##

END


And my OVF file (minus the account info):


ODBC:/[EMAIL PROTECTED] 
GIS 
wkbPoint 

 





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


Re: [mapserver-users] Drawing a line

2008-10-16 Thread Roger André
Do you mean "given" as in "submitted via a web page"?  In that case I think
I would use Python mapscript to add a LAYER similar to the one I sent below,
but using the form variables submitted from the web page as the POINTS
values.  Take a look at the chapter on Python Mapscript in the O'Reilley Web
Mapping Illustrated book.  It explains it more clearly than I'm probably
able to.

Perhaps someone else on the list has another idea.
--


On Wed, Oct 15, 2008 at 9:40 PM, ramya srinivasan <[EMAIL PROTECTED]>wrote:

> Hi,
>  Thanks for yor reply.Can u please tell me how to draw a line between two
> points given by the user?
>
> On Wed, Oct 15, 2008 at 10:23 PM, Roger André <[EMAIL PROTECTED]> wrote:
>
>> You can add a new LAYER with a FEATURE that has the 2 points specified in
>> it, like this:
>>
>>   LAYER
>> NAME 'line'
>> STATUS DEFAULT
>> TYPE LINE
>> FEATURE
>>   POINTS  -67.012 -16.952
>> -67.012 -17.450
>>
>>   END
>> END
>> CLASS
>>   STYLE
>> COLOR 255 0 0
>> WIDTH 2
>>   END
>> END # class
>>   END # layer
>>
>> ##
>>
>>
>>  On Wed, Oct 15, 2008 at 3:42 AM, ramya srinivasan <[EMAIL PROTECTED]>wrote:
>>
>>>  Hi,  How to draw a line on the map between two points given by the
>>> user? What all should be included in the mapfile for this line layer.
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Drawing a line

2008-10-16 Thread Fawcett, David
If you just want to pass the feature in using a URL configuration, you wouldn't 
need to use mapscript.  Just have the empty layer in your map file and then 
pass the feature definition in like:
 
 
&map_layer[3]=FEATURE+POINTS+-67.012+-16.952+-67.012+-17.450+END+TEXT+'A+test+line'+END&...
 
David. 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger 
André
Sent: Thursday, October 16, 2008 11:11 AM
To: ramya srinivasan
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Drawing a line


Do you mean "given" as in "submitted via a web page"?  In that case I 
think I would use Python mapscript to add a LAYER similar to the one I sent 
below, but using the form variables submitted from the web page as the POINTS 
values.  Take a look at the chapter on Python Mapscript in the O'Reilley Web 
Mapping Illustrated book.  It explains it more clearly than I'm probably able 
to.

Perhaps someone else on the list has another idea.
--



On Wed, Oct 15, 2008 at 9:40 PM, ramya srinivasan <[EMAIL PROTECTED]> 
wrote:


Hi,
 Thanks for yor reply.Can u please tell me how to draw a line 
between two points given by the user?


On Wed, Oct 15, 2008 at 10:23 PM, Roger André <[EMAIL 
PROTECTED]> wrote:


You can add a new LAYER with a FEATURE that has the 2 
points specified in it, like this:

  LAYER
NAME 'line'
STATUS DEFAULT
TYPE LINE
FEATURE
  POINTS  -67.012 -16.952
-67.012 -17.450

  END
END
CLASS
  STYLE
COLOR 255 0 0
WIDTH 2
  END
END # class
  END # layer

##



On Wed, Oct 15, 2008 at 3:42 AM, ramya srinivasan 
<[EMAIL PROTECTED]> wrote:


Hi, 
 How to draw a line on the map between two 
points given by the user? What all should be included in the mapfile for this 
line layer.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users






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


[mapserver-users] AGG output with mapscript C# 5.2 problem...

2008-10-16 Thread Paul james
Hello guys...
I´m using lastest MS4W mapscript compilation (5.2) ...

So, I tried to use AGG output like that:
MAP
...
IMAGETYPE png
...
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
IMAGEMODE "RGB"
  END

I got I image, but in GD .. So I tried to modify the IMAGETYPE, like that:
IMAGETYPE AGG

And I got a error (System.AccessViolationException) ...

Any ideias ?

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


[mapserver-users] speed optimization with shptree - when is it wothwhile?

2008-10-16 Thread Mark Volz
Hello,

 

I am currently experimenting with the shptree utility.  I notice that shptree
increases the drawing performance on shapefiles that have thousands of
features.  However, I was wondering what the threshold number of features in
a shapefile is before I should use the utility.  For example should I use
ShpTree for shapefiles that have 100 features or wait until there are 1,000
features in the shapefiles?  If anyone has any advice as to when I should use
ShpTree let me know.

 

Thanks,

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


Re: [mapserver-users] speed optimization with shptree - when is it wothwhile?

2008-10-16 Thread Gregor Mosheh

Mark Volz wrote:
For example should I use ShpTree for shapefiles that have 100 features 
or wait until there are 1,000 features in the shapefiles?


Not to sound simplistic, but it never HURTS to use it, so why not use it 
every time? Only takes a second, doesn't even increase the disk usage.


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS don't load

2008-10-16 Thread Daniel Morissette

[EMAIL PROTECTED] wrote:


Here is the log

[...]
[Wed Oct 08 09:00:10 2008].667000 HTTP: request failed with curl error 
code 6 () for 
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:42304&WIDTH=400&BBOX=689899.721196215,-333292.3983286,2867511.32395514,2047197.11324934&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage[Wed 
Oct 08 09:00:10 2008].667000 msHTTPExecuteRequests(): HTTP request 
error. HTTP: request failed with curl error code 6 () for 
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:42304&WIDTH=400&BBOX=689899.721196215,-333292.3983286,2867511.32395514,2047197.11324934&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage 



According to http://curl.haxx.se/libcurl/c/libcurl-errors.html, error 
code 6 is:


  CURLE_COULDNT_RESOLVE_HOST (6)

  Couldn't resolve host. The given remote host was not resolved.

Sounds like a DNS config problem on your server... can you double-check 
your network settings?




I get a blank image. But if I use the connection string that is in the 
log file and send it directly from internet explorer I get the image.
http://atlas.gc.ca/cgi-bin/atlaswms_fr?LAYERS=pe_15m&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:42304&WIDTH=400&BBOX=689899.721196215,-333292.3983286,2867511.32395514,2047197.11324934&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage 



Did you try opening the URL using I.E. (or wget if it's Linux) directly 
on the server that produces the error?


Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Map is OK with shp2img but blank with CGI

2008-10-16 Thread Rahkonen Jukka
Hi,

It would be a great help if you could send the whole mapfile, otherwise we must 
be guessing.
Still, here is my guess that is not related to mapfile but to where it is. Your 
mapfile is now in d: root directory. It may well be that Apache does not have a 
permission to use that.  Move your mapfile somewhere under ms4w, for example to 
ms4w\apps.

-Jukka Rahkonen-

> Hi list !
>
> I am very very new to mapserver, so please forgive me if I missed 
> something stupid.
> I've read the most important parts of the documentation (CGI reference and 
> MapFile reference), so I am starting to get it, but I have a strange 
> problem.
>
> I installed mapserver on my own computer.
> I created a basic mapfile, with only two layers. One is a RASTER layer, 
> the other one a POSTGIS layer.
>
> If I run
> shp2img -m D:\mymap.map -o D:\test.png
> it runs OK, the image is created and the content is good (so EXTENT and 
> SIZE are good).
>
> Now, if I open my browser and go to
> http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=D:\mymap.map&mode=map
> all I get is a blank image. The size of the image is OK (it is the size I 
> specified in the mapfile).
>
> I tried with the command line equivalent (mapserv -nh 
> "QUERYSTRING=map=map=D:\mymap.map&mode=map"  blank image.
>
> I have activated DEBUG on MAP level an both LAYER levels, but all I get in 
> the debug file are lines saying "[Wed Oct 15 16:49:01 2008].37 CGI 
> Request 1 on process 3316" etc...
>
>
> Now, I really don't know what I should try next...
> Does anyone know what I did wrong here ?
>
> Thanks a lot for helping !
>
> -- 
> Arnaud Lesauvage

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


Re: [MAPSERVER-USERS] mssql2008 binary test package available to download

2008-10-16 Thread Tamas Szekeres
2008/10/16 BrainDrain <[EMAIL PROTECTED]>:
> -without "WITH(INDEX..." in mapfile data section - mem corruption exception
> on "shape = layer.getFeature(featureIndexe, -1)" after successful execution
> of queryByPoint (querying the largest polygon in my geodb);

I didn't encounter any memory corruption error here, could you provide
an example to this?
I've set up your database with IIS and apache with the following links:
http://vbkto.dyndns.org:1280/cgi-bin/mapserv.exe?mode=map&map=test2008.map
http://vbkto.dyndns.org:1080/cgi-bin/mapserv.exe?mode=map&map=test2008.map


> -with using "WITH(INDEX...":
> msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL
> statement: select convert(varchar(max), STATUS),convert(varchar(max),
> STAGE),convert(varchar(max), id),GEOM from dbo.Construct
> WITH(INDEX(SIndx_Construct_geometry_geom)) where id = 190748
> -[Microsoft][ODBC SQL Server Driver][SQL Server]Query processor could not
> produce a query plan because of the hints defined in this query. Resubmit
> the query without specifying any hints and without using SET FORCEPLAN.
> When I'm trying to execute this select statement in man. studio - error
> message - the same.
> I think because where clause don't contains conditions related to spatial
> index used in 'WITH' hint.

You're right, just looking into the code here is a possible solution:

DATA "GEOM from dbo.Construct USING UNIQUE id USING SRID=0 USING INDEX
SIndx_Construct_geometry_geom"



Best regards,

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


Re: [mapserver-users] AGG output with mapscript C# 5.2 problem...

2008-10-16 Thread Tamas Szekeres
Paul,

Could you provide further information (sampe app, data, mapfile) to
reproduce the problem?

Best regards,

Tamas



2008/10/16 Paul james <[EMAIL PROTECTED]>:
> Hello guys...
> I´m using lastest MS4W mapscript compilation (5.2) ...
>
> So, I tried to use AGG output like that:
> MAP
> ...
> IMAGETYPE png
> ...
> OUTPUTFORMAT
> NAME 'AGG'
> DRIVER AGG/PNG
> IMAGEMODE "RGB"
>   END
>
> I got I image, but in GD .. So I tried to modify the IMAGETYPE, like that:
> IMAGETYPE AGG
>
> And I got a error (System.AccessViolationException) ...
>
> Any ideias ?
>
> Thanks
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Query length with mapscript.

2008-10-16 Thread Paul moen
Is there a maximum length of the query text when setting a filter  
with php mapscript?


For example,

I use
$tempLayer->setfilter('contract_id IN  
(26,27,1093,608,596,134,111,36,37,4599,95,59,41,42,605,117,47,105,146,13 
0,123,122,5017,98,66,67,68,69,133,71,131,74,75,76,77,148,94,81,82,108,97 
, 
85,86,4974,88,89,90,91,93,100,1956,124,125,140,145,141,139,157,152,154,1 
56,158,5018,183,162,164,165,173,167,168,169,171,334,174,2083,184,177,743 
, 
182,186,187,188,332,190,2092,193,195,196,1107,199,200,201,202,203,205,20 
6,5015,208,209,218,212,213,214,219,221,222,224,225,226,229,4695,232,235, 
238,239,241,244,245,246,247,2015,251,2016,253,256,258,260,261,466,265,26 
6,267,268,269,270,593,381,274,595,276,279,280,281,607,283,284,285,286,20 
45,299,298,291,292,293,295,296,297,302,1955,304,306,333,309,310,311,385, 
316,318,3456,123)');


and I get the error

PHP Warning:  [MapServer Error]: prepare_database(): Error executing  
POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor  
BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d 
(geom_pnt)),'NDR'),parcel_id::text from (select  
parcel_id,county,contract_id,land_title_holder,parcel_location,ST_Centro 
id(geom) as geom_pnt FROM parcels) as foo WHERE ((contract_id IN  
(26,27,1093,608,596,134,111,36,37,4599,95,59,41,42,605,117,47,105,146,13 
0,123,122,5017,98,66,67,68,69,133,71,131,74,75,76,77,148,94,81,82,108,97 
, 
85,86,4974,88,89,90,91,93,100,1956,124,125,140,145,141,139,157,152,154,1 
56,158,5018,183,162,164,165,173,167,168,169,171,334,174,2083,184,177,743 
, 
182,186,187,188,332,190,2092,193,195,196,1107,199,200,201,202,203,205,20 
6,5015,208,209,218,212,213,214,219,221,222,224,225,226,229,4695,232,235, 
238,239,241,244,245,246,247,2015,251,2016,253,256,258,260,261,466,265,26 
6,267,268,269,270,593,381,274,595,276,279,280,281,607,283,284,285,286,20 
45,299,298,291,292,293,295,296,297,302,1955,304,306,333,309,310,311,385, 
316,318,3


which truncates the sql statement.

Is there a way to increase the length of the query allowed?

Thanks,

Paul

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


Re: [mapserver-users] examples of Web GIS interaction between citizensand governments?

2008-10-16 Thread Steve Lime
We use web gis in a couple of situations to collect geographic information
that is used as part of a departmental business process:

1) Tagged fish reporting. Staff created an application to capture the locations
where tagged fish were caught. That information is used to generally locate
the catch in a water body, but it also used to direct the details of the catch 
to
the appropriate field staff.

  http://www.dnr.state.mn.us/fisheries/tagged_fish_reporting/index.html

2) Burning Permit Sales. We use a simple application that allows users to locate
the site where they intend to burn stuff (woody debris). That location is 
critical
in determining if they are in an area that is open to burning, what specific
restrictions might be in affect and so on. Those locations are then made 
available
to emergency response folks though an extranet web mapping application so they
know where active permits are at any time.

  http://www.dnr.state.mn.us/burning_permits/

Steve


>>> "M. Fioretti" <[EMAIL PROTECTED]> 10/16/08 9:20 AM >>>
Greetings,

Many state and local Public Administrations around the world use Open
Source GIS software to present their geographic data through the
Internet. Most of those websites, however, are one-way only. The end
user can navigate through a digital map, zoom, unzoom, select layers
and so on... but he or she cannot use the system to directly
_communicate_ geographic-related information to the Public
Administration which created that website.

I am thinking to any kind of things like

"click on this map wherever you have seen an abusive dumpster/polluted
springs/ill trees/ whatever, enter a short explanation in the form
which will pop up and the server will immediately send that comment
via email to the police station closer to that point and put a link to
your comment on the map itself"

Do you know of any website of this kind? the reason I'm asking is both
to write an article on this and to add such examples to a generic
presentation about "GIS for local public administrations" I have to
give next month.

Thank you in advance for any input.

Best Regards,
  Marco Fioretti

-- 
Your own civil rights and the quality of your life heavily depend on how
software is used *around* you:http://digifreedom.net/node/84
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


Re: [mapserver-users] examples of Web GIS interaction between citizensand governments?

2008-10-16 Thread M. Fioretti
On Thu, Oct 16, 2008 22:51:58 PM -0500, Steve Lime wrote:
> We use web gis in a couple of situations to collect geographic information
> that is used as part of a departmental business process:
> 
> 1) Tagged fish reporting:
   http://www.dnr.state.mn.us/fisheries/tagged_fish_reporting/index.html
> 
> 2) Burning Permit Sales:
>   http://www.dnr.state.mn.us/burning_permits/
> 

Steve,

thanks a lot, this is exactly what I was looking for: official, public
services offered through a GIS interface. I hope the list members know
more examples of this kind, or even of existing community GIS websites
which a public administration may "adopt", that is replicate and
integrate with its internal software tools to streamline operations.

Marco

-- 
Your own civil rights and the quality of your life heavily depend on how
software is used *around* you:http://digifreedom.net/node/84
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] LABEL FOLLOW STREETS

2008-10-16 Thread ntiamoah bernard
Hi guys,
How do I make my streets label follow the orientation of the streets. I mean i 
want some of the labels to be vertical, curve and horizontal. I set the "angle" 
to "auto" but nothing happened. 
thanks guys


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


Re: [mapserver-users] LABEL FOLLOW STREETS

2008-10-16 Thread Ritesh Ambastha
ANGLE FOLLOW will suffice your requirement.

- Ritesh Ambastha

On Fri, Oct 17, 2008 at 10:55 AM, ntiamoah bernard <[EMAIL PROTECTED]>wrote:

> Hi guys,
> How do I make my streets label follow the orientation of the streets. I
> mean i want some of the labels to be vertical, curve and horizontal. I set
> the "angle" to "auto" but nothing happened.
> thanks guys
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
Ritesh Ambastha
Deputy Manager Technology,
Reliance Entertainment/RCL,
Dhirubhai Ambani Knowledge Center(DAKC),
+91-9930770183
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] LABEL FOLLOW STREETS

2008-10-16 Thread Wim Blanken
Hi Ritesh,

 

Here an example that is working for me...

 

LAYER

NAME  "Wegen"

TYPE   Line

STATUS   ON

DATA   "provincie\wegvak"

LABELITEM  "STT_NAAM"

CLASSITEM "wegnummer"

CLASS

EXPRESSION   /^[0_9]/

LABEL

   SIZE10

   TYPE   TRUETYPE

   ANTIALIAS   TRUE

   OUTLINECOLOR   255 255 255

   FONT   verdana

   ANGLEFOLLOW

   POSITIONAUTO

   OFFSET   0 0

   COLOR0 0 0

   BUFFER  60

MINDISTANCE  200

PARTIALSFALSE

MINFEATURESIZE   100

END # LABEL

END  # CLASS

END  # LAYER

 

Greetz,

 

Wim Blanken

The Netherlands

 

  _  

Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Ritesh Ambastha
Verzonden: vrijdag 17 oktober 2008 7:34
Aan: [EMAIL PROTECTED]
CC: mapserver-users@lists.osgeo.org
Onderwerp: Re: [mapserver-users] LABEL FOLLOW STREETS

 

ANGLE FOLLOW will suffice your requirement.

- Ritesh Ambastha

On Fri, Oct 17, 2008 at 10:55 AM, ntiamoah bernard <[EMAIL PROTECTED]>
wrote:


Hi guys,

How do I make my streets label follow the orientation of the streets. I mean
i want some of the labels to be vertical, curve and horizontal. I set the
"angle" to "auto" but nothing happened. 

thanks guys



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




-- 
Ritesh Ambastha
Deputy Manager Technology, 
Reliance Entertainment/RCL, 
Dhirubhai Ambani Knowledge Center(DAKC),
+91-9930770183

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


Re: [MAPSERVER-USERS] Query length with mapscript.

2008-10-16 Thread BrainDrain

I'd recommend you use queryByIndex with bAddToQuery=true to avoid this error
I don't like 'in ()' operator at all))


Paul Moen-3 wrote:
> 
> Is there a maximum length of the query text when setting a filter  
> with php mapscript?
> 
> For example,
> 
> I use
> $tempLayer->setfilter('contract_id IN  
> (26,27,1093,608,596,134,111,36,37,4599,95,59,41,42,605,117,47,105,146,13 
> 0,123,122,5017,98,66,67,68,69,133,71,131,74,75,76,77,148,94,81,82,108,97 
> , 
> 85,86,4974,88,89,90,91,93,100,1956,124,125,140,145,141,139,157,152,154,1 
> 56,158,5018,183,162,164,165,173,167,168,169,171,334,174,2083,184,177,743 
> , 
> 182,186,187,188,332,190,2092,193,195,196,1107,199,200,201,202,203,205,20 
> 6,5015,208,209,218,212,213,214,219,221,222,224,225,226,229,4695,232,235, 
> 238,239,241,244,245,246,247,2015,251,2016,253,256,258,260,261,466,265,26 
> 6,267,268,269,270,593,381,274,595,276,279,280,281,607,283,284,285,286,20 
> 45,299,298,291,292,293,295,296,297,302,1955,304,306,333,309,310,311,385, 
> 316,318,3456,123)');
> 
> and I get the error
> 
> PHP Warning:  [MapServer Error]: prepare_database(): Error executing  
> POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor  
> BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d 
> (geom_pnt)),'NDR'),parcel_id::text from (select  
> parcel_id,county,contract_id,land_title_holder,parcel_location,ST_Centro 
> id(geom) as geom_pnt FROM parcels) as foo WHERE ((contract_id IN  
> (26,27,1093,608,596,134,111,36,37,4599,95,59,41,42,605,117,47,105,146,13 
> 0,123,122,5017,98,66,67,68,69,133,71,131,74,75,76,77,148,94,81,82,108,97 
> , 
> 85,86,4974,88,89,90,91,93,100,1956,124,125,140,145,141,139,157,152,154,1 
> 56,158,5018,183,162,164,165,173,167,168,169,171,334,174,2083,184,177,743 
> , 
> 182,186,187,188,332,190,2092,193,195,196,1107,199,200,201,202,203,205,20 
> 6,5015,208,209,218,212,213,214,219,221,222,224,225,226,229,4695,232,235, 
> 238,239,241,244,245,246,247,2015,251,2016,253,256,258,260,261,466,265,26 
> 6,267,268,269,270,593,381,274,595,276,279,280,281,607,283,284,285,286,20 
> 45,299,298,291,292,293,295,296,297,302,1955,304,306,333,309,310,311,385, 
> 316,318,3
> 
> which truncates the sql statement.
> 
> Is there a way to increase the length of the query allowed?
> 
> Thanks,
> 
> Paul
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Query-length-with-mapscript.-tp20026655p20027575.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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