Re: [mapserver-users] Need Help with Custom (Raster) Data as Input

2009-01-26 Thread Muizudeen Kusimo
Dear All,

I appreciate the responses I have received so far but I am new to GIS so
please do not take offense at my (trivial) questions.

I want to:
a) Build a web application like Google Maps.

I have:
b) Little map data that needs to be re-drawn due to it's poor quality, lack
of geo-reference info and lack of coordinate grid.
c) Adjusted my map extents as advised by Rahkonen for display in Ka-Maps
without luck.
d) Being reading the manuals for MapServer, Ka-Map, OpenLayers and QGIS. I
hope to adopt either OpenLayers or Ka-Map as my UI + MapServer as my
backend.

I would like this list to:
e) Guide me on how to achieve my aim in (a) above using my choice of
technology in (d) below. Specifically, how do I prepare my poor maps (that
better be re-drawn) for the tools I am studying.
f) Offer any other useful advice.

Lastly, if my questions are too elementary for this list. Can someone please
point me to an appropriate list/website/irc channel.

Thanks in advance.

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


Re: [mapserver-users] Dynamin SQL with mapserver CGI?

2009-01-26 Thread umn-ms
Hi 

 You can use a replaceable parameter in the FILTER clause if all you ...
This introduces the hazard of SQL-Injection, doesn't it?

Bye
Benedikt Rothe

mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 14:04:42:

 On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban srph...@yahoo.com wrote:
  Hi all
  I'm looking for a way to change SQL dynamically via URL parameters. it
  sounds from doc that changing DATA element in map file is impossible. 
Is
  there any other way?
 
 You can use a replaceable parameter in the FILTER clause if all you
 want to do is alter the WHERE clause. So for example:
FILTER %criteria%
 and
   criteria=id='value'
 would work with a database like Postgres.
 
 When working with a database you put the whole SQL WHERE clause in the
 FILTER, whereas with shapefiles or ORG data sources you use the
 FILTERITEM and FILTER.
 
 -- 
 Richard Greenwood
 richard.greenw...@gmail.com
 www.greenwoodmap.com
 ___
 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] Dynamin SQL with mapserver CGI?

2009-01-26 Thread Rahkonen Jukka
Hi,
 
Not any great hazard, I believe, if it means that user can normally get all the 
features, but only a subset when filter is set.  It is different case if DATA 
clause is manipulated, and therefore that must be connected to DATAPATTERN.
 
-Jukka Rahkonen-




Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta umn...@hydrotec.de
Lähetetty: 26. tammikuuta 2009 10:03
Vastaanottaja: MapServer
Aihe: Re: [mapserver-users] Dynamin SQL with mapserver CGI?



Hi 

 You can use a replaceable parameter in the FILTER clause if all you 
... 
This introduces the hazard of SQL-Injection, doesn't it? 

Bye 
Benedikt Rothe 

mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 14:04:42:

 On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban srph...@yahoo.com 
wrote:
  Hi all
  I'm looking for a way to change SQL dynamically via URL parameters. 
it
  sounds from doc that changing DATA element in map file is 
impossible. Is
  there any other way?
 
 You can use a replaceable parameter in the FILTER clause if all you
 want to do is alter the WHERE clause. So for example:
FILTER %criteria%
 and
   criteria=id='value'
 would work with a database like Postgres.
 
 When working with a database you put the whole SQL WHERE clause in the
 FILTER, whereas with shapefiles or ORG data sources you use the
 FILTERITEM and FILTER.
 
 -- 
 Richard Greenwood
 richard.greenw...@gmail.com
 www.greenwoodmap.com
 ___
 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] Wrong Scaledenom-Interpretation on GetLegendGraphic-Request

2009-01-26 Thread teeschke

dear Mapserver..

a Layer that has a MaxScaleDenom of 200.001 becomes an empty LegendGraphic
with SCALE=20

http://localhost/cgi-bin/mapserv.exe?map=C:/Projekte/legend/mapfile.mapSERVICE=WMSREQUEST=GetLegendGraphicVERSION=1.1.1FORMAT=image/gifLAYER=tw_messstellenSCALE=20

The LegendGraphic is rendered correctly with SCALE  199668 like 

http://localhost/cgi-bin/mapserv.exe?map=C:/Projekte/legend/mapfile.mapSERVICE=WMSREQUEST=GetLegendGraphicVERSION=1.1.1FORMAT=image/gifLAYER=tw_messstellenSCALE=199667

My Layer is defined as following:

LAYER
  NAME 'myLayer'
  STATUS ON
  TYPE POINT
  DATA shapes/myShape
  PROJECTION
init=epsg:31466
   END
  TEMPLATE 'template.html'
  DUMP TRUE
  DEBUG 5
  METADATA
ows_title myLayer Title
ows_extent 2454609 5423025 2709939 5650998
wms_feature_info_mime_type text/html
wms_server_version 1.1.1
wms_format image/png
wms_srs epsg:31466
wms_exceptions_format application/vnd.ogc.se_xml
gml_featureid ID
gml_include_items NAME
gml_NAME_alias Name
  END #METADATA
  MINSCALEDENOM 0
  MAXSCALEDENOM 21
  CLASS
NAME ' '
MINSCALEDENOM 0
MAXSCALEDENOM 21
STYLE
  COLOR 128 171 255
  OUTLINECOLOR 0 0 255
  SYMBOL 'circle'
  SIZE 13
END #STYLE
  END #CLASS
END #LAYER

Thank a lot for solving this problem and best regards..
..Daniel

-- 
View this message in context: 
http://n2.nabble.com/Wrong-Scaledenom-Interpretation-on-GetLegendGraphic-Request-tp2217378p2217378.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


SV: [mapserver-users] Need Help with Custom (Raster) Data as Input

2009-01-26 Thread Morten Sickel
Dear Muizudeen,

As far as I understand you,you try to do three things at once
- Learn GIS
- Learn a new programming tool (mapserver et.al.)
- Clean up your existing data

All these goals are good to try to achieve, but not at once. Most of all, when 
starting to learn GIS and starting to learn mapserver, you should be sure that 
the data you are using are of good quality, i.e. at least well defined 
projection and geo references, if that is not correctly set up, What I would 
recommend you to do is to start up using some other available data sets of the 
same type as what you are using (geo tiffs, or whatever) Set up a map server 
application using those data sets, read up on projections and geo referencing, 
try to find some other data sets covering the same area as the first you got, 
but in other projections, play around a bit with those data, also changing the 
projection of the map-file. This way you know that what you are doing in map 
server makes sense. parallell with this, you can try to collect the nessecary 
information on the other maps you have, and make a new map-file using those 
data sets. 

If the maps are scanned files, they can be made into geo-tiffs, ie a tiff file 
and a corresponding tfw file, the latter giving the coordinates for one of the 
corners of the map, the cell size and the rotation angle of the map, I don't 
remember the details at the moment, but that should be quite easy to google for.

best wishes.

Morten



Fra: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] p#229; vegne av Muizudeen Kusimo 
[devbo...@gmail.com]
Sendt: 26. januar 2009 09:16
Til: mapserver-users@lists.osgeo.org
Emne: Re: [mapserver-users] Need Help with Custom (Raster) Data as Input

Dear All,

I appreciate the responses I have received so far but I am new to GIS so please 
do not take offense at my (trivial) questions.

I want to:
a) Build a web application like Google Maps.

I have:
b) Little map data that needs to be re-drawn due to it's poor quality, lack of 
geo-reference info and lack of coordinate grid.
c) Adjusted my map extents as advised by Rahkonen for display in Ka-Maps 
without luck.
d) Being reading the manuals for MapServer, Ka-Map, OpenLayers and QGIS. I hope 
to adopt either OpenLayers or Ka-Map as my UI + MapServer as my backend.

I would like this list to:
e) Guide me on how to achieve my aim in (a) above using my choice of technology 
in (d) below. Specifically, how do I prepare my poor maps (that better be 
re-drawn) for the tools I am studying.
f) Offer any other useful advice.

Lastly, if my questions are too elementary for this list. Can someone please 
point me to an appropriate list/website/irc channel.

Thanks in advance.

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


Re: [mapserver-users] mapfile: displaying a feature from a shapefile.

2009-01-26 Thread Christy Nieman

Hi,

As already mentioned, what is missing is the LABELITEM in your layer 
definition.  Without this, MapServer will not know what attribute to use 
for labelling.  Your layer should look something like this:


# Road tracks
LAYER
   NAME 'mytown'
   TYPE LINE
   DATA '/var/www/manual/examples/mytown/data/mytown.shp'
*LABELITEM road_name*
   METADATA
 'wms_title' 'mytown'
  'gml_include_items' 'all'
   END
DUMP TRUE
   STATUS DEFAULT
   TRANSPARENCY 80
   PROJECTION
 'proj=longlat'
 'ellps=WGS84'
 'datum=WGS84'
 'no_defs'
 ''
   END

 CLASS
   STYLE
 COLOR 102 0 0
 SIZE 2
 SYMBOL line_solid
   END
   STYLE
 COLOR 204 51 51
 SIZE 1
 SYMBOL line_solid
   END
   LABEL
 TYPE truetype
 FONT PerspectiveBlack
 SIZE 11
   END
 END
END


Best regards,
Christy

--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnie...@dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca

kende wrote:

Hi Jukka,

Thank you for your reply, I did RTFM before posting my question, and tried
LABELITEM (that was one of the several 'ways' quote in my original post),
also tried a separate layer for just the road names (separate and grouped),
and may other things, and none seemed to work, I didn't want to add too much
clutter
to my post, and my mapfile went through a lot of 'revisions/versions'.

Thanks.


Hi,

Looks like there is no LABELITEM set on layer descriptions.  Document An
introduction to MapServer (http://www.mapserver.org/introduction.html) does
mention LABELITEM but that part of text is messy.  Perhaps it should be
reviewed.

-Jukka Rahkonen-



  


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


Re: [mapserver-users] plz response immediate(msSaveImageGD(): Unable to open file for writing)

2009-01-26 Thread Jeff McKenna

Amiya Patra wrote:

Hi,

Thanks for reply. I tried all those steps found at the URL which you 
sent. But, still it's not working. The same file works fine in Linux. I 
got the following error:


*Warning*: [MapServer Error]: msSaveImageGD(): Unable to open file 
./../temp/363403.gif for writing in *C:\ms4w\Apache\htdocs\data\xy.php* 
on line *578*


*Fatal error*: Failed writing image to ./../temp/363403.gif in 
*C:\ms4w\Apache\htdocs\data\xy.php* on line *578


*Please, help me regarding this.

Thanks.

Regards,
Amiya.


Note that MS4W is pre-configured for the following settings:

  IMAGEPATH /ms4w/tmp/ms_tmp/
  IMAGEURL /ms_tmp/

I recommend following the structure of an existing MS4W add-on package 
(such as the PHP/MapScript Sample Application) and look at its 
mapfiles to see how they are working.


-jeff



--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


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


Re: [mapserver-users] SLD and antialiasing

2009-01-26 Thread Yewondwossen Assefa

Peter Sykora wrote:

Hi all,
I would like to create a WMS with antialiased Polygons. The ANTIALIAS true 
statement in the style object works fine until I use an SLD to style my polygons.

See the difference:
- Styling with mapfile
http://81.10.192.123:443/cgi/stat?LAYERS=statREASPECT=falseTRANSPARENT=trueSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageFORMAT=image%2FpngSRS=EPSG%3A31255BBOX=39500,299250,81750,341500WIDTH=256HEIGHT=256

- Styling with an external SLD
http://81.10.192.123:443/cgi/stat?LAYERS=statREASPECT=falseTRANSPARENT=trueSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageFORMAT=image%2FpngSRS=EPSG%3A31255BBOX=39500,299250,81750,341500WIDTH=256HEIGHT=256sld=http://www.carto.net/ps/sld/sld_stat.xml

Certainly there is no possiblity to define the antialiasing in the SLD, but I 
wonder whether there is a mechanism to keep the antialias statement somehow in 
the styling object, independently of the definition in the SLD.



Peter,

This is not possible currently. As you noted there are elements that are 
 not translated between SLD-Mapserver. As suggested agg would give 
anti-aliasing by default and could be work around.



Best Regards


Thanks in advance for any ideas
Peter





--

Assefa Yewondwossen
Software Analyst

Email: ass...@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925


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


Re: [mapserver-users] Get Feature Info into gmaps balloon

2009-01-26 Thread gzambotti

many thanks Guillaume
it works fine now!

Best

Giovanni

On Fri, Jan 23, 2009 at 5:42 PM, Guillaume Sueur-2 (via Nabble) 
ml-user+137812-417701...@n2.nabble.comml-user%2b137812-417701...@n2.nabble.com
 wrote:

 try with :
 using unique gid
 in your data string

 regards

 guillaume

 gzambotti a écrit :
  Hi there,
 
  I am new with mapserver.
  I use a WMS/mapserver (4.9) to Get Feature Info into a google maps
 balloon.
  If I set my mapfile to a shapefile everything works very well.
  When I try to use PostGIS I get this error (Content-type:
  application/vnd.ogc.se_xml ).
  any idea?
 
  many thanks, Giovanni
 
  Here my mapfile:
 
  LAYER
NAME ED_Total
MINSCALE 100
  CONNECTIONTYPE postgis
  CONNECTIONuser=africamaps password=j0kerz dbname=africamaps
  host=localhost port=5432
  #DATA  the_geom from ED_Total using unique gid USING
 SRID=4326
  DATA  the_geom from (select gid, NAME, CITY, STATE, the_geom

  from ED_Total) as foo using unique the_geom using SRID=4326
  #DATA   /opt/CGA/data/vec/gio1/shapefile/EDtotal
  TYPE POINT
  METADATA
  wms_title ED_Total
wms_srs EPSG:4326 EPSG:900913 EPSG:41001 EPSG:54004
  'wms_include_items' 'all'
   wms_onlineresource
  
 http://cga-3.hmdc.harvard.edu/cgi-bin/mapserv?map=/opt/CGA/newam/htdocs/gtest/ednet.map;

   ows_exceptions_format application/vnd.ogc.se_xml
   wms_exceptions_format application/vnd.ogc.se_xml 
   wms_exceptions_format application-vnd.ogc.se_inimage
   wms_ature_info_mime_type text/html
  END
  STATUS ON
  PROJECTION  +init=epsg:4326
  END #projection
  CLASS
NAME lt 1
  STYLE
   COLOR 255 255 250
   SYMBOL 'circle'
SIZE 8.5
  END
  STYLE
COLOR 255 0 0
SYMBOL 'thickcross'
SIZE 7.5
  END
  END #class
  HEADER /opt/CGA/newam/htdocs/gtest/header.html
  TEMPLATE /opt/CGA/newam/htdocs/gtest/query.html
  FOOTER /opt/CGA/newam/htdocs/gtest/footer.html
  END #layer
 
 
 ___
 mapserver-users mailing list
 mapserver-us...@...http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=2206440i=0
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


 --
  This email is a reply to your post @
 http://n2.nabble.com/Get-Feature-Info-into-gmaps-balloon-tp2206135p2206440.html
 You can reply by email or by visting the link above.




-- 
Giovanni Zambotti
34 Prince st, Cambridge MA
02139 USA
Phone: (617) 492 - 0359

-- 
View this message in context: 
http://n2.nabble.com/Get-Feature-Info-into-gmaps-balloon-tp2206135p2218219.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] Dynamin SQL with mapserver CGI?

2009-01-26 Thread Fawcett, David
Of course, part of security is also having your application hit your database 
as a user that only has the rights that it needs.  If your user only has select 
rights on only the data that you want to expose, that should help limit some of 
these issues.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of umn...@hydrotec.de
Sent: Monday, January 26, 2009 4:43 AM
To: MapServer
Subject: Re: [mapserver-users] Dynamin SQL with mapserver CGI?



 Not any great hazard, I believe, ... 

Mmh. I'd be cautious. 

Example: 
* Mapfile: 
   DATA the_geom from buildings

* Set Filter via URL to this: 
  1=1);DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR SELECT * 
from buildings WHERE (1=1 

I think Mapserver will create the following statements: (I've added 
newlines) 
DECLARE mycursor BINARY CURSOR FOR SELECT the_geom from buildings WHERE 
(1=1); 
DELETE FROM OTHERTABLE; 
DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1) and (%s 
 setSRID( ...) ) 

Mapserver calls PQExec with these statements. PQExec will execute every 
statement and will return 
the results of the last one. 

Bye 
Benedikt Rothe 


Rahkonen Jukka jukka.rahko...@mmmtike.fi schrieb am 26.01.2009 
09:34:31:

 Hi, 
   
 Not any great hazard, I believe, if it means that user can normally 
 get all the features, but only a subset when filter is set.  It is 
 different case if DATA clause is manipulated, and therefore that 
 must be connected to DATAPATTERN. 
   
 -Jukka Rahkonen- 
 
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] Puolesta umn...@hydrotec.de
 Lähetetty: 26. tammikuuta 2009 10:03
 Vastaanottaja: MapServer
 Aihe: Re: [mapserver-users] Dynamin SQL with mapserver CGI?

 
 Hi 
 
  You can use a replaceable parameter in the FILTER clause if all you 
... 
 This introduces the hazard of SQL-Injection, doesn't it? 
 
 Bye 
 Benedikt Rothe 
 
 mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 
14:04:42:
 
  On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban srph...@yahoo.com 
wrote:
   Hi all
   I'm looking for a way to change SQL dynamically via URL 
parameters. it
   sounds from doc that changing DATA element in map file is 
impossible. Is
   there any other way?
  
  You can use a replaceable parameter in the FILTER clause if all you
  want to do is alter the WHERE clause. So for example:
 FILTER %criteria%
  and
criteria=id='value'
  would work with a database like Postgres.
  
  When working with a database you put the whole SQL WHERE clause in 
the
  FILTER, whereas with shapefiles or ORG data sources you use the
  FILTERITEM and FILTER.
  
  -- 
  Richard Greenwood
  richard.greenw...@gmail.com
  www.greenwoodmap.com
  ___
  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] GIS and GPS

2009-01-26 Thread Rafael chacón
Hello, I'm trying to develop an application that takes points input from a
GPS ... And I would like to realize when  those points enter at certain
points .. Suppose a state or cities... I'm working with Mapserver and
PostGIS .. Someone can give me an idea of how to accomplish this?

Thanks in advanced.

-- 
Rafael Chacon,

El hombre es la medida de todas las cosas. Protagoras
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] .img raster file (8 bit and 1 band)

2009-01-26 Thread simone.frigerio

Dear All!

1) I have an .img raster file (8 bit and 1 band) to put
inside mapfile. Pixel value goes from 0 to 255 (field
value)  there are also other filed of information that I
want to use to classify my layer. This is a draft of the
layer table:
OID value  sin
0 00,002
1 40,001
2 80,128
   ...   ..
84   2550,98

How can I define mapfile to have a floating
classification? There is an expression to constrict
mapserver to use a value field. The other solution is to
do 256 classes But it's quite long.  I found on doc
the instruction to use not 8-bit classification. But this
8bit so I need other way.

2) If I want to define a query for the same layer in wich
for each pixel appears the voice of sin field. I have
seen the script  for 3 bands; how can I do wit my layer?:
Pixel:br
  values=[value_list]br

  value_0=[value_0]br
  value_1=[value_1]br
  value_2=[value_2]br
  RGB = [red],[green],[blue]p
  Class = [class]br

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


[mapserver-users] Question about formats

2009-01-26 Thread David Martinez Morata
Hello.

I have a question about the input formats  for Mapserver.
They take de dxf format?

Thanks

-- 
Martinez Morata David
Thinking GIS
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Question about formats

2009-01-26 Thread Frank Warmerdam

David Martinez Morata wrote:

Hello.

I have a question about the input formats  for Mapserver.
They take de dxf format?


David,

No, currently it is not practical to read DXF directly in MapServer. You
will need to translate it to supported format externally.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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


Re: [mapserver-users] Get Feature Info into gmaps balloon

2009-01-26 Thread gzambotti

Hi Guillaume,

Perhaps you have some idea...

I would like to have more control on GetFeatureInfo
into my Google Maps balloon.

For instance instead of seeing: 

GetFeatureInfo results: Search returned no results

when I don't have information. 
I would like to see something like (No info for this point).
Do I have to work with the template html
and maybe javascript?
Have any one wrote something like this.

Again many thanks

Best,

Giovanni



many thanks Guillaume
it works fine now!

Best

Giovanni

On Fri, Jan 23, 2009 at 5:42 PM, Guillaume Sueur-2 (via Nabble) 
ml-user+137812-417701...@n2.nabble.comml-user%2b137812-417701...@n2.nabble.com
 wrote:

 try with :
 using unique gid
 in your data string

 regards

 guillaume

 gzambotti a écrit :
  Hi there,
 
  I am new with mapserver.
  I use a WMS/mapserver (4.9) to Get Feature Info into a google maps
 balloon.
  If I set my mapfile to a shapefile everything works very well.
  When I try to use PostGIS I get this error (Content-type:
  application/vnd.ogc.se_xml ).
  any idea?
 
  many thanks, Giovanni
 
  Here my mapfile:
 
  LAYER
NAME ED_Total
MINSCALE 100
  CONNECTIONTYPE postgis
  CONNECTIONuser=africamaps password=j0kerz dbname=africamaps
  host=localhost port=5432
  #DATA  the_geom from ED_Total using unique gid USING
 SRID=4326
  DATA  the_geom from (select gid, NAME, CITY, STATE,
 the_geom

  from ED_Total) as foo using unique the_geom using SRID=4326
  #DATA   /opt/CGA/data/vec/gio1/shapefile/EDtotal
  TYPE POINT
  METADATA
  wms_title ED_Total
wms_srs EPSG:4326 EPSG:900913 EPSG:41001 EPSG:54004
  'wms_include_items' 'all'
   wms_onlineresource
  
 http://cga-3.hmdc.harvard.edu/cgi-bin/mapserv?map=/opt/CGA/newam/htdocs/gtest/ednet.map;

   ows_exceptions_format application/vnd.ogc.se_xml
   wms_exceptions_format application/vnd.ogc.se_xml 
   wms_exceptions_format application-vnd.ogc.se_inimage
   wms_ature_info_mime_type text/html
  END
  STATUS ON
  PROJECTION  +init=epsg:4326
  END #projection
  CLASS
NAME lt 1
  STYLE
   COLOR 255 255 250
   SYMBOL 'circle'
SIZE 8.5
  END
  STYLE
COLOR 255 0 0
SYMBOL 'thickcross'
SIZE 7.5
  END
  END #class
  HEADER /opt/CGA/newam/htdocs/gtest/header.html
  TEMPLATE /opt/CGA/newam/htdocs/gtest/query.html
  FOOTER /opt/CGA/newam/htdocs/gtest/footer.html
  END #layer
 
 
 ___
 mapserver-users mailing list
 mapserver-us...@...http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=2206440i=0
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


 --
  This email is a reply to your post @
 http://n2.nabble.com/Get-Feature-Info-into-gmaps-balloon-tp2206135p2206440.html
 You can reply by email or by visting the link above.




-- 
Giovanni Zambotti
34 Prince st, Cambridge MA
02139 USA
Phone: (617) 492 - 0359



-- 
View this message in context: 
http://n2.nabble.com/Get-Feature-Info-into-gmaps-balloon-tp2206135p2219684.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] Dynamin SQL with mapserver CGI?

2009-01-26 Thread Steve Lime
In addition, one can and should apply validation patterns to variables
used in SQL. That way MapServer
can test the input data before handing off to PostGIS or whatever.

These patterns are set in LAYER metadata. For example:

LAYER
  ...
  DATA'the_geom FROM (SELECT the_geom FROM my_table WHERE ID = '%id%')
as foo USING UNIQUE OID  
  METADATA
id_validation_pattern '^[0-9]{3}$'
  END
END

This tells the CGI to test the request parameter against the regex
'^[1-9]{3}$'. The regex says that the value
of the id variable must be an number exactly 3 digits long with no
zeros. Any attempt to send a value other
than that will generate an error message. The CGI code does not force
the use of validation.

Validation like this will be further expanded in 5.4 with the addition
of a new validation object. So you'd see 
something like:

LAYER
  ...
  VALIDATION
'id'  '^[0-9]{3}$
  END
END

Steve

 On 1/26/2009 at 8:47 AM, in message
6246727221874a4fb8d3f9bbc37d9bd5056da...@s-sp22.pca.state.mn.us,
Fawcett,
David david.fawc...@state.mn.us wrote:
 Of course, part of security is also having your application hit your
database 
 as a user that only has the rights that it needs.  If your user only
has 
 select rights on only the data that you want to expose, that should
help 
 limit some of these issues.
 
   -Original Message-
   From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
 umn...@hydrotec.de 
   Sent: Monday, January 26, 2009 4:43 AM
   To: MapServer
   Subject: Re: [mapserver-users] Dynamin SQL with mapserver CGI?
   
   
 
Not any great hazard, I believe, ... 
   
   Mmh. I'd be cautious. 
   
   Example: 
   * Mapfile: 
  DATA the_geom from buildings
   
   * Set Filter via URL to this: 
 1=1);DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR
SELECT * from 
 buildings WHERE (1=1 
   
   I think Mapserver will create the following statements: (I've
added 
 newlines) 
   DECLARE mycursor BINARY CURSOR FOR SELECT the_geom from
buildings WHERE 
 (1=1); 
   DELETE FROM OTHERTABLE; 
   DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1)
and (%s  
 setSRID( ...) ) 
   
   Mapserver calls PQExec with these statements. PQExec will
execute every 
 statement and will return 
   the results of the last one. 
   
   Bye 
   Benedikt Rothe 
   
   
   Rahkonen Jukka jukka.rahko...@mmmtike.fi schrieb am
26.01.2009 09:34:31:
   
Hi, 
  
Not any great hazard, I believe, if it means that user can
normally 
get all the features, but only a subset when filter is set. 
It is 
different case if DATA clause is manipulated, and therefore
that 
must be connected to DATAPATTERN. 
  
-Jukka Rahkonen- 

Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:
mapserver-users-boun...@lists.osgeo.org] Puolesta
umn...@hydrotec.de 
Lähetetty: 26. tammikuuta 2009 10:03
Vastaanottaja: MapServer
Aihe: Re: [mapserver-users] Dynamin SQL with mapserver CGI?
   

Hi 

 You can use a replaceable parameter in the FILTER clause if
all you ... 
This introduces the hazard of SQL-Injection, doesn't it? 

Bye 
Benedikt Rothe 

mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009
14:04:42:

 On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban
srph...@yahoo.com wrote:
  Hi all
  I'm looking for a way to change SQL dynamically via URL
parameters. it
  sounds from doc that changing DATA element in map file is
impossible. Is
  there any other way?
 
 You can use a replaceable parameter in the FILTER clause if
all you
 want to do is alter the WHERE clause. So for example:
FILTER %criteria%
 and
   criteria=id='value'
 would work with a database like Postgres.
 
 When working with a database you put the whole SQL WHERE
clause in the
 FILTER, whereas with shapefiles or ORG data sources you use
the
 FILTERITEM and FILTER.
 
 -- 
 Richard Greenwood
 richard.greenw...@gmail.com 
 www.greenwoodmap.com 
 ___
 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] Question about formats

2009-01-26 Thread Venkat Rao Tammineni
Hi,

 

 

  As per my Knowledge, mapserver will not take dxf file formats. You have to
convert  into shape file and you can use the shp as you input.

 

Thanks and regards

Venkat.

 

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of David Martinez
Morata
Sent: Monday, January 26, 2009 9:52 PM
To: mapserver
Subject: [mapserver-users] Question about formats

 

Hello.

I have a question about the input formats  for Mapserver.
They take de dxf format?

Thanks

-- 
Martinez Morata David
Thinking GIS

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


RE: [mapserver-users] GIS and GPS

2009-01-26 Thread Morten Sickel
Raphael,

As far as I can understand, what you are trying to do is what is known as an 
overlay I don't know how to do that in mapserver / PostGIS, but I would guess 
some kind of spatial query in postgis should help you.

best wishes

Morten Sickel


From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rafael chacón
Sent: Monday, January 26, 2009 4:17 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] GIS and GPS

Hello, I'm trying to develop an application that takes points input from a GPS 
... And I would like to realize when  those points enter at certain points .. 
Suppose a state or cities... I'm working with Mapserver and PostGIS .. Someone 
can give me an idea of how to accomplish this?

Thanks in advanced.

--
Rafael Chacon,

El hombre es la medida de todas las cosas. Protagoras
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users