[mapserver-users] mapscript: read GeoJSON

2011-07-13 Thread Frank Broniewski

Hi,

what would be the best way to read a geojson feature/featurecollection 
with mapscript?


My goal is to query a map by a feature which comes as geojson. Of course 
it's not too hard to parse the geojson into a mapserver geometry object 
(pointObj, lineObj, ...). But if there's already a best practice (with 
the aid of other libraries, like ogr, shapely maybe?), I'd be happy to 
apply this one.


Many thanks

Frank
--
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] msShapefileOpen(): Unable to access file

2011-07-13 Thread Dave Chetan
Hi Brent,

After changes my Layer tag is

  LAYER
NAME DGN
CONNECTIONTYPE OGR
STATUS ON
TILEINDEX index_dgn.shp
TILEITEM location
TYPE LINE
UNITS METERS
CLASS
  NAME DGN
  STYLE
ANGLE 360
COLOR 240 215 209
SYMBOL LineDash
WIDTH 1
  END
END
  END

and the error message is

INPUT=SHAPEFILE
Exception executing MapControl::RefreshMap
7/13/2011 4:30:13 PM|msConnPoolRegister(): General error message.
Missing CONNECTION on layer DGN.;msConnPoolRegister(): General error
message. Missing CONNECTION on layer DGN.;msConnPoolRegister():
General error message. Missing CONNECTION on layer
DGN.;msConnPoolRegister(): General error message. Missing CONNECTION
on layer DGN.;msConnPoolRegister(): General error message. Missing
CONNECTION on layer DGN.;msConnPoolRegister(): General error message.
Missing CONNECTION on layer DGN.
7/13/2011 4:30:13 PM|   at OSGeo.MapServer.mapObj.draw()
   at MapCreator.Controls.MapControl.RefreshMap()

Regards,
Dave C.

On 7/12/11, Brent Fraser bfra...@geoanalytic.com wrote:
 Dave,

I've had good success rendering DGN files referenced in a TILEINDEX
 (http://lists.osgeo.org/pipermail/mapserver-users/2010-December/067444.html).
 Try adding .shp to the end of your TILEINDEX:

 TILEINDEX index_dg.shp

 as OGR handles the files differently than Mapserver's native shapefile
 mechanism.

 Best Regards,
 Brent Fraser


 On 7/12/2011 6:25 AM, Dave Chetan wrote:
 Dear Jukka,

 Yes, I am able to publish single DGN.
 But when I go for tiled dgn, I have error.

 Regards,
 Dave C.

 On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi  wrote:
 Hi,

 I have never played with DGN files with Mapserver. I would blindly follow
 the documents and try first with just one DGN file as in
 http://mapserver.org/input/vector/dgn.html
 and forward next to ogrtileindex as in
 http://mapserver.org/input/vector/ogr.html
 Perhaps there is something important in the syntax of TILEINDEX given in
 the
 following example.

 LAYER
NAME ogr_points
TYPE POINT
CONNECTIONTYPE OGR
TILEINDEX PIP_ogr_tiles.shp,0

 -Jukka Rahkonen-
 
 Lähettäjä: Dave Chetan [csdav...@gmail.com]
 Lähetetty: 12. heinäkuuta 2011 14:58
 Vastaanottaja: Rahkonen Jukka
 Kopio: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] msShapefileOpen(): Unable to access file

 Hi Rahkonen,

 Thanks for the prompt reply..!!

 If I add
   CONNECTIONTYPE OGR

 in the Layer Tag, then the error is

   7/12/2011 4:29:20 PM|msDrawMap(): Image handling error. Failed to draw
   layer named 'DGN'.;msOGRFileOpen(): OGR error. Open failed for OGR
   connection in layer `DGN'.  File not found or unsupported format.
   7/12/2011 4:29:20 PM|   at OSGeo.MapServer.mapObj.draw()
  at MapCreator.Controls.MapControl.RefreshMap()

 Regards,
 Dave C.


 On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi  wrote:
 Hi,

 I guess that Mapserver is seaching for shapefiles as default. Read the
 document http://mapserver.org/input/vector/ogr.html and have a try with
 CONNECTIONTYPE=OGR.

 -Jukka Rahkonen
 
   Dave Chetan wrote:


 Hi,

 I am publishing DGN data using tile option. I am getting error
 msShapefileOpen(): Unable to access file.

 Following are the details of Input data, steps executed and error log.

 Please, if anyone can help in resolving the issue.

 Source files are DGN
D:\Tile\DGN\Final\1.dgn
D:\Tile\DGN\Final\3.dgn
D:\Tile\DGN\Final\5.dgn
D:\Tile\DGN\Final\7.dgn
D:\Tile\DGN\Final\9.dgn

 Step1)-
 Creation of Index tile

 ogrtindex.exe d:\Tile\DGN\Final\index_dgn.shp d:\Tile\DGN\Final\*.dgn

 Ogrtindex created index_dgn.shp index file

 Step2)-
 Map file
 
EXTENT 699218.75297987 2251967.57943806 755021.241547886
 2291053.54827586
SHAPEPATH D:\Tile\DGN\Final
 .


  LAYER
  NAME DGN
  STATUS ON
  TILEINDEX index_dgn
  TILEITEM location
  TYPE LINE
  UNITS METERS
  CLASS
NAME DGN
STYLE
  ANGLE 360
  COLOR 240 215 209
  SYMBOL LineDash
  WIDTH 1
END
  END
END



 Error

 7/12/2011 4:21:33 PM|msDrawMap(): Image handling error. Failed to draw
 layer named 'DGN'.;msTiledSHPOpenFile(): Shapefile error. Unable to
 open a single tile to use as a template in layer
 DGN.;msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\9.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\9.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\9.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\7.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\7.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\7.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\5.dgn,0);msShapefileOpen(): Unable to access file.
 (d:\Tile\DGN\Final\5.dgn,0);msShapefileOpen(): Unable to access 

Re: [mapserver-users] WFS with OpenLayers

2011-07-13 Thread geographika

Hi,

I spent awhile configuring MapServer and OpenLayers - the notes here may 
help.


http://geographika.co.uk/mapserver-openlayers-and-the-wfs-maze

--
web:http://geographika.co.uk
twitter: @geographika



On 11/07/2011 10:54, parseca...@web.de wrote:

Hello MapServer users,

are there any good tutorials how to set up MapServer 6.0 for WFS? It doesn't 
work for me with OpenLayers.

Thanks for any hint...
Regards,

Alex
___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar
___
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] substitution in a PostGIS layer .. ?

2011-07-13 Thread Julien Cigar

Hello,

I have the following mapfile: http://www.pastie.org/2206896 with the 
following SLD: http://www.pastie.org/2206902 (generated dynamically)


I wondered how can I change the WHERE sp.id=%SPID% in the subselect 
(following a CGI parameter)?


I read http://mapserver.org/cgi/runsub.html, and tried with %SPID% (by 
passwing SPID=3 in my URL) but it doesn't seems to work ... any idea?


Thanks,
Julien

--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
attachment: jcigar.vcf___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] substitution in a PostGIS layer .. ?

2011-07-13 Thread Julien Cigar

OK.. I missed the (must validate against DATAPATTERN) part.

I added SPID_validation_pattern ^[0-9]+$ in my METADATA and it works !

However, it looks a little hackish to me .. I wondered if Mapserver 
uses PQescapeStringConn() in background? In other words: is 
_validation_pattern the only way to protect against SQL injection? What 
it I allow a pattern that may take part in a SQL injection (like ', #, ..) ?


Thanks,
Julien

On 07/13/2011 14:29, Julien Cigar wrote:

Hello,

I have the following mapfile: http://www.pastie.org/2206896 with the
following SLD: http://www.pastie.org/2206902 (generated dynamically)

I wondered how can I change the WHERE sp.id=%SPID% in the subselect
(following a CGI parameter)?

I read http://mapserver.org/cgi/runsub.html, and tried with %SPID% (by
passwing SPID=3 in my URL) but it doesn't seems to work ... any idea?

Thanks,
Julien



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



--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
attachment: jcigar.vcf___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] substitution in a PostGIS layer .. ?

2011-07-13 Thread Daniel Morissette

On 11-07-13 08:41 AM, Julien Cigar wrote:

OK.. I missed the (must validate against DATAPATTERN) part.

I added SPID_validation_pattern ^[0-9]+$ in my METADATA and it works !

However, it looks a little hackish to me .. I wondered if Mapserver
uses PQescapeStringConn() in background? In other words: is
_validation_pattern the only way to protect against SQL injection? What
it I allow a pattern that may take part in a SQL injection (like ', #,
..) ?



The %variable% replacement stuff does not attempt to do any kind of 
escaping at the moment, so yes you are on your own with your validation 
pattern.


--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

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


Re: [mapserver-users] substitution in a PostGIS layer .. ?

2011-07-13 Thread Julien Cigar

On 07/13/2011 15:07, Daniel Morissette wrote:

On 11-07-13 08:41 AM, Julien Cigar wrote:

OK.. I missed the (must validate against DATAPATTERN) part.

I added SPID_validation_pattern ^[0-9]+$ in my METADATA and it
works !

However, it looks a little hackish to me .. I wondered if Mapserver
uses PQescapeStringConn() in background? In other words: is
_validation_pattern the only way to protect against SQL injection? What
it I allow a pattern that may take part in a SQL injection (like ', #,
..) ?



The %variable% replacement stuff does not attempt to do any kind of
escaping at the moment, so yes you are on your own with your validation
pattern.



This may be a stupid question but: is there a reason why 
PQescapeStringConn() is not used to do the substitution?


Thanks,
Julien


--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
attachment: jcigar.vcf___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] substitution in a PostGIS layer .. ?

2011-07-13 Thread Rahkonen Jukka
Julien Cigar wrote:

 This may be a stupid question but: is there a reason why
 PQescapeStringConn() is not used to do the substitution?

Perhaps because Mapserver does not support just PostgreSQL but also Oracle, SQL 
Server, MySQL, Informix, CouchDB  etc.  Therefore it is good to have some 
general purpose validation system. Of cause more sophisticated systems for each 
datastore would not harm.

-Jukka Rahkonen-

 Thanks,
 Julien

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


Re: [mapserver-users] msShapefileOpen(): Unable to access file

2011-07-13 Thread Brent Fraser

Dave,

Strange, it should work.  I'm using mapserver v5.6.3, with a layer def of:

  LAYER # LINE
NAME 'LINE'
CONNECTIONTYPE OGR
STATUS on
TILEINDEX G:\GeoData\1_250k\Alberta\AltaLIS\250k_west.shp
TYPE LINE
PROJECTION
  'proj=tmerc'
  'ellps=GRS80'
  'lat_0=0.0'
  'lon_0=-117.0'
  'x_0=50.0'
  'y_0=-500'
  'k=0.9996'
  'units=m'
  'nadgrids=@null'
  'no_defs'
END
INCLUDE AltaLIS_250k_render_inc.map
  END

and the content of the location attribute reported by ogrinfo is :

  LOCATION (String) = G:\GeoData\1_250k\Alberta\AltaLIS\82gpos.dgn


Try adding a PROJECTION object to your LAYER def.  And try using a full 
path in the TILEINDEX.


Best Regards,
Brent Fraser


On 7/13/2011 5:08 AM, Dave Chetan wrote:

Hi Brent,

After changes my Layer tag is

   LAYER
 NAME DGN
 CONNECTIONTYPE OGR
 STATUS ON
 TILEINDEX index_dgn.shp
 TILEITEM location
 TYPE LINE
 UNITS METERS
 CLASS
   NAME DGN
   STYLE
 ANGLE 360
 COLOR 240 215 209
 SYMBOL LineDash
 WIDTH 1
   END
 END
   END

and the error message is

INPUT=SHAPEFILE
Exception executing MapControl::RefreshMap
7/13/2011 4:30:13 PM|msConnPoolRegister(): General error message.
Missing CONNECTION on layer DGN.;msConnPoolRegister(): General error
message. Missing CONNECTION on layer DGN.;msConnPoolRegister():
General error message. Missing CONNECTION on layer
DGN.;msConnPoolRegister(): General error message. Missing CONNECTION
on layer DGN.;msConnPoolRegister(): General error message. Missing
CONNECTION on layer DGN.;msConnPoolRegister(): General error message.
Missing CONNECTION on layer DGN.
7/13/2011 4:30:13 PM|   at OSGeo.MapServer.mapObj.draw()
at MapCreator.Controls.MapControl.RefreshMap()

Regards,
Dave C.

On 7/12/11, Brent Fraserbfra...@geoanalytic.com  wrote:

Dave,

I've had good success rendering DGN files referenced in a TILEINDEX
(http://lists.osgeo.org/pipermail/mapserver-users/2010-December/067444.html).
Try adding .shp to the end of your TILEINDEX:

TILEINDEX index_dg.shp

as OGR handles the files differently than Mapserver's native shapefile
mechanism.

Best Regards,
Brent Fraser


On 7/12/2011 6:25 AM, Dave Chetan wrote:

Dear Jukka,

Yes, I am able to publish single DGN.
But when I go for tiled dgn, I have error.

Regards,
Dave C.

On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi   wrote:

Hi,

I have never played with DGN files with Mapserver. I would blindly follow
the documents and try first with just one DGN file as in
http://mapserver.org/input/vector/dgn.html
and forward next to ogrtileindex as in
http://mapserver.org/input/vector/ogr.html
Perhaps there is something important in the syntax of TILEINDEX given in
the
following example.

LAYER
NAME ogr_points
TYPE POINT
CONNECTIONTYPE OGR
TILEINDEX PIP_ogr_tiles.shp,0

-Jukka Rahkonen-

Lähettäjä: Dave Chetan [csdav...@gmail.com]
Lähetetty: 12. heinäkuuta 2011 14:58
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] msShapefileOpen(): Unable to access file

Hi Rahkonen,

Thanks for the prompt reply..!!

If I add
   CONNECTIONTYPE OGR

in the Layer Tag, then the error is

   7/12/2011 4:29:20 PM|msDrawMap(): Image handling error. Failed to draw
   layer named 'DGN'.;msOGRFileOpen(): OGR error. Open failed for OGR
   connection in layer `DGN'.  File not found or unsupported format.
   7/12/2011 4:29:20 PM|   at OSGeo.MapServer.mapObj.draw()
  at MapCreator.Controls.MapControl.RefreshMap()

Regards,
Dave C.


On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi   wrote:

Hi,

I guess that Mapserver is seaching for shapefiles as default. Read the
document http://mapserver.org/input/vector/ogr.html and have a try with
CONNECTIONTYPE=OGR.

-Jukka Rahkonen

   Dave Chetan wrote:


Hi,

I am publishing DGN data using tile option. I am getting error
msShapefileOpen(): Unable to access file.

Following are the details of Input data, steps executed and error log.

Please, if anyone can help in resolving the issue.

Source files are DGN
D:\Tile\DGN\Final\1.dgn
D:\Tile\DGN\Final\3.dgn
D:\Tile\DGN\Final\5.dgn
D:\Tile\DGN\Final\7.dgn
D:\Tile\DGN\Final\9.dgn

Step1)-
Creation of Index tile

ogrtindex.exe d:\Tile\DGN\Final\index_dgn.shp d:\Tile\DGN\Final\*.dgn

Ogrtindex created index_dgn.shp index file

Step2)-
Map file

EXTENT 699218.75297987 2251967.57943806 755021.241547886
2291053.54827586
SHAPEPATH D:\Tile\DGN\Final
.


  LAYER
  NAME DGN
  STATUS ON
  TILEINDEX index_dgn
  TILEITEM location
  TYPE LINE
  UNITS METERS
  CLASS
NAME DGN
STYLE
  ANGLE 360
  COLOR 240 215 209
  SYMBOL LineDash
  WIDTH 1
END
  END
END



Error

7/12/2011 4:21:33 PM|msDrawMap(): Image 

Re: [mapserver-users] msShapefileOpen(): Unable to access file

2011-07-13 Thread Rahkonen Jukka
Hi,

One remark: the missing connection error was a fault alarm (CONNECTION is not 
needed with TILEINDEX).  We got those lines into log file at least with 
Mapserver 5.2 series but it has been corrected later.  Version 6.0 does not 
produce those. I do not remember what was the situation with 5.4.x and 5.6.x.
Add DEBUG 5 into your layer, let's hope it will generate something useful into 
into Mapserver log.

-Jukka Rahkonen-

Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] k#228;ytt#228;j#228;n Brent Fraser 
[bfra...@geoanalytic.com] puolesta
Lähetetty: 13. heinäkuuta 2011 16:55
Vastaanottaja: Dave Chetan
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] msShapefileOpen(): Unable to access file

Dave,

Strange, it should work.  I'm using mapserver v5.6.3, with a layer def of:

   LAYER # LINE
 NAME 'LINE'
 CONNECTIONTYPE OGR
 STATUS on
 TILEINDEX G:\GeoData\1_250k\Alberta\AltaLIS\250k_west.shp
 TYPE LINE
 PROJECTION
   'proj=tmerc'
   'ellps=GRS80'
   'lat_0=0.0'
   'lon_0=-117.0'
   'x_0=50.0'
   'y_0=-500'
   'k=0.9996'
   'units=m'
   'nadgrids=@null'
   'no_defs'
 END
 INCLUDE AltaLIS_250k_render_inc.map
   END

and the content of the location attribute reported by ogrinfo is :

   LOCATION (String) = G:\GeoData\1_250k\Alberta\AltaLIS\82gpos.dgn


Try adding a PROJECTION object to your LAYER def.  And try using a full
path in the TILEINDEX.

Best Regards,
Brent Fraser


On 7/13/2011 5:08 AM, Dave Chetan wrote:
 Hi Brent,

 After changes my Layer tag is

LAYER
  NAME DGN
  CONNECTIONTYPE OGR
  STATUS ON
  TILEINDEX index_dgn.shp
  TILEITEM location
  TYPE LINE
  UNITS METERS
  CLASS
NAME DGN
STYLE
  ANGLE 360
  COLOR 240 215 209
  SYMBOL LineDash
  WIDTH 1
END
  END
END

 and the error message is

 INPUT=SHAPEFILE
 Exception executing MapControl::RefreshMap
 7/13/2011 4:30:13 PM|msConnPoolRegister(): General error message.
 Missing CONNECTION on layer DGN.;msConnPoolRegister(): General error
 message. Missing CONNECTION on layer DGN.;msConnPoolRegister():
 General error message. Missing CONNECTION on layer
 DGN.;msConnPoolRegister(): General error message. Missing CONNECTION
 on layer DGN.;msConnPoolRegister(): General error message. Missing
 CONNECTION on layer DGN.;msConnPoolRegister(): General error message.
 Missing CONNECTION on layer DGN.
 7/13/2011 4:30:13 PM|   at OSGeo.MapServer.mapObj.draw()
 at MapCreator.Controls.MapControl.RefreshMap()

 Regards,
 Dave C.

 On 7/12/11, Brent Fraserbfra...@geoanalytic.com  wrote:
 Dave,

 I've had good success rendering DGN files referenced in a TILEINDEX
 (http://lists.osgeo.org/pipermail/mapserver-users/2010-December/067444.html).
 Try adding .shp to the end of your TILEINDEX:

 TILEINDEX index_dg.shp

 as OGR handles the files differently than Mapserver's native shapefile
 mechanism.

 Best Regards,
 Brent Fraser


 On 7/12/2011 6:25 AM, Dave Chetan wrote:
 Dear Jukka,

 Yes, I am able to publish single DGN.
 But when I go for tiled dgn, I have error.

 Regards,
 Dave C.

 On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi   wrote:
 Hi,

 I have never played with DGN files with Mapserver. I would blindly follow
 the documents and try first with just one DGN file as in
 http://mapserver.org/input/vector/dgn.html
 and forward next to ogrtileindex as in
 http://mapserver.org/input/vector/ogr.html
 Perhaps there is something important in the syntax of TILEINDEX given in
 the
 following example.

 LAYER
 NAME ogr_points
 TYPE POINT
 CONNECTIONTYPE OGR
 TILEINDEX PIP_ogr_tiles.shp,0

 -Jukka Rahkonen-
 
 Lähettäjä: Dave Chetan [csdav...@gmail.com]
 Lähetetty: 12. heinäkuuta 2011 14:58
 Vastaanottaja: Rahkonen Jukka
 Kopio: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] msShapefileOpen(): Unable to access file

 Hi Rahkonen,

 Thanks for the prompt reply..!!

 If I add
CONNECTIONTYPE OGR

 in the Layer Tag, then the error is

7/12/2011 4:29:20 PM|msDrawMap(): Image handling error. Failed to draw
layer named 'DGN'.;msOGRFileOpen(): OGR error. Open failed for OGR
connection in layer `DGN'.  File not found or unsupported format.
7/12/2011 4:29:20 PM|   at OSGeo.MapServer.mapObj.draw()
   at MapCreator.Controls.MapControl.RefreshMap()

 Regards,
 Dave C.


 On 7/12/11, Rahkonen Jukkajukka.rahko...@mmmtike.fi   wrote:
 Hi,

 I guess that Mapserver is seaching for shapefiles as default. Read the
 document http://mapserver.org/input/vector/ogr.html and have a try with
 CONNECTIONTYPE=OGR.

 -Jukka Rahkonen
 
Dave Chetan wrote:


 Hi,

 I am publishing DGN data using tile option. I am getting error
 msShapefileOpen(): Unable to access file.

 

[mapserver-users] MapServer 6.0.1, 5.6.7 and 4.10.7 releases with security fixes

2011-07-13 Thread Daniel Morissette
The MapServer team announces the release of MapServer versions 6.0.1, 
5.6.7 and 4.10.7.


No new functionality has been added. 6.0.1 is a maintence release that 
fixes a few issues including recently discovered security 
vulnerabilities. The list of fixes since 6.0.0 is included at the end of 
this message.


Versions 5.6.7 and 4.10.7 include fixes for the security vulnerabilities 
described below plus a few bug fixes that may have occurred since the 
last official release. See the respective HISTORY.TXT files for 
additional information.


IMPORTANT SECURITY FIXES:
-

MapServer developers have discovered flaws in the OGC filter support in 
MapServer. That code is used in support of WFS, WMS-SLD and SOS 
specifications.


All versions may be susceptible to SQL injection under certain 
circumstances. The extent of the vulnerability depends on the MapServer 
version, relational database and mapfile configuration being used. All 
users are ** strongly encouraged ** to upgrade to these latest releases.


The 5.6.7 and 4.10.7 releases also address one significant potentially 
exploitable buffer overflow (6.0 branch is not vulneralble).


These fixes do not affect the functionality of MapServer and no changes 
will be necessary for configurations/applications using the same base 
branch (e.g. 5.6).


Even though we release 6.0.1, 5.6.7 and 4.10.7 today, these security 
fixes have also been backported to all stable branches (going back to 
4.10) in MapServer's Subversion (SVN) source code repository, so if you 
work from source and would like to patch your local MapServer source 
tree, the changeset (i.e. patch file) for each stable release can be 
obtained through the following Trac ticket:


  - http://trac.osgeo.org/mapserver/ticket/3903

Special thanks to Even Rouault for his work identifying the issues and 
the subsequent patching and testing he did.


Source and binary downloads:


The source code is available at:

http://mapserver.org/download.html

The binary distributions listed in the download page should be updated
with binaries for the new 6.0.1 release (and in some cases 5.6.7) in the 
next few hours, if not already done.


We have also submitted security patches to the Ubuntu and Debian 
supported distributions that are in the process of being reviewed.


The MapServer Team


Version 6.0.1 (2011-07-12):
---

IMPORTANT SECURITY FIXES:

-  Fixes to prevent SQL injections through OGC filter encoding (in WMS, WFS
   and SOS), as well as a potential SQL injection in WMS time support.
   Your system may be vulnerable if it has MapServer with OGC protocols
   enabled, with layers connecting to an SQL RDBMS backend, either
   natively or via OGR (#3903)

- Applied patch for ticket (symbol writing issues) (#3589)

- Fix performance issue with Oracle and scrollable cursors (#3905)

- Fix attribute binding for layer styles (#3941)

- Added missing fclose() when writing query files (#3943)

- Fix double-free in msAddImageSymbol() when filename is a http resource 
(#3939)


- Fix rendering of lines with outlinewidth set if not on first style (#3935)

- Added writing of cluster object when saving map. Also improved handling of
  cluster parsing errors (#3934)

- Fix for the cluster processing if the shape bounds doesn't overlap
  with the given extent (#3913)

- OGC Filter: fix segfault when a ows_varname_type or wfs_varname_type is
  defined but not a gml_varname_type (#3902)

- Fix regression of MapServer 6.0.0 when specifying a time range in WMS time
  requests on a Postgis layer (#3909)

- Fixed order of metadata lookup for WMS GML GetFeatureInfo. 'ows' should
  come last, not first (#3636).

- Fixed mssql2008 to return correct geometries with chart layer type (#3894)

- Write SYMBOLSET/END tags when saving a symbol file (#3885)

- Make java threadtests work again (#3887)

- Fix segfault on malformed PropertyIsLike filters (#3888)

- Fixed the query handling problem with the Oracle spatial driver (#3878)

- Fixed potential crash with AVERAGE resampling and crazy reprojection 
(#3886)


- Fix for the warnings in mapunion.c (#3880)

- Fixed the build problem in mapunion.c (#3877)

- Union layer: Fixed the crash when styling source layers using 
attributes (#3870)


- Improve rangeset item checking so that Bands=1,2,3 is supported with 
WCS 1.0

  (#3919).

- Fix GetMapserverUnitUsingProj() for proj=latlong (#3883)



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


Re: [mapserver-users] mapscript: read GeoJSON

2011-07-13 Thread Steve Lime
OGR would be the most straightforward I'd think. You could write the GeoJSON
to a file and then craft a layer to access it directly...

Steve

On Wed, Jul 13, 2011 at 4:07 AM, Frank Broniewski b...@metrico.lu wrote:

 Hi,

 what would be the best way to read a geojson feature/featurecollection with
 mapscript?

 My goal is to query a map by a feature which comes as geojson. Of course
 it's not too hard to parse the geojson into a mapserver geometry object
 (pointObj, lineObj, ...). But if there's already a best practice (with the
 aid of other libraries, like ogr, shapely maybe?), I'd be happy to apply
 this one.

 Many thanks

 Frank
 --
 Frank BRONIEWSKI

 METRICO s.à r.l.
 géomètres
 technologies d'information géographique
 rue des Romains 36
 L-5433 NIEDERDONVEN

 tél.: +352 26 74 94 - 28
 fax.: +352 26 74 94 99
 http://www.metrico.lu
 __**_
 mapserver-users mailing list
 mapserver-users@lists.osgeo.**org mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://lists.osgeo.org/mailman/listinfo/mapserver-users

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


AW: [mapserver-users] WFS with OpenLayers

2011-07-13 Thread Arnd Wippermann
Hi,
 
Good explanation.
I like MapServer, but sometimes it is difficult to get it working as one
wishes. I haven't tried WFS version 1.1.0 yet.
 
A hint to OpenLayers. If you include proj4.js and the projection files
needed for your purpose to your application, and adds the param projection
to your wfs layer options, you can reproject the wfs response clientside.
 
Best Regards,
Arnd

  _  

Von: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von geographika
Gesendet: Mittwoch, 13. Juli 2011 13:18
An: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] WFS with OpenLayers


Hi,

I spent awhile configuring MapServer and OpenLayers - the notes here may
help. 

http://geographika.co.uk/mapserver-openlayers-and-the-wfs-maze


--
web: http://geographika.co.uk  http://geographika.co.uk
twitter: @geographika




On 11/07/2011 10:54, parseca...@web.de wrote: 

Hello MapServer users,



are there any good tutorials how to set up MapServer 6.0 for WFS? It doesn't
work for me with OpenLayers.



Thanks for any hint...

Regards,



Alex

___

Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die

Toolbar eingebaut! http://produkte.web.de/go/toolbar

___

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