[mapserver-users] Problems With Google Earth WMS view
Hello. I create a WMS for GE and I found some estrange things. In my Map file I don't define a background colour and I could like to be Transparent, but... At some levels I have the transparent image and at other levels I don't have it I don't really understand Wat is happening. I have 3 Layer in different zoom levels, The first One it's a line layer and the others are Points layers. And in some areas of my map I found problems with transparency If i put in some area i have the transparency but if i change a littel bit, the bacgruond becomes with. And just one question: can define a resolution for the output image? Thanks ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] disk space
Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio Scopri il blog di Yahoo! Mail: Trucchi, novità e scrivi la tua opinione. http://www.ymailblogit.com/blog___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Hi, Why don’t you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio _ Scopri il Blog http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Thanks for the quick reply, When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ? best regards, Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:05 Hi, Why don’t you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! Scopri il blog di Yahoo! Mail: Trucchi, novità e scrivi la tua opinione. http://www.ymailblogit.com/blog___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Hi, See after click or whatere it is …. OnOPageprerender Image will be creating an image. And after creation image will be deleting.what my project is doing the same.I am giving that code.. below… protected override void OnPreRender(EventArgs e) { LaodMainMap(ibMap); //Load MainMap by } public void LaodMainMap(System.Web.UI.WebControls.ImageButton imgMap) { MapFunction.Deleteimages();//delete Image form temp folder string imageLoc; string imageURL; imageObj imgRef; imgRef = MapFunction.Map.drawQuery(); imageLoc = MapFunction.OutputDir + / + System.DateTime.Now.ToBinary() + . + imgRef.format.extension; imageURL = imageLoc.Substring(imageLoc.IndexOf(MapFunction.OutputDirURL)); imgRef.save(imageLoc, null); ibMap.Width = imgRef.width; ibMap.Height = imgRef.height; ibMap.ImageUrl = imageURL; MapFunction.IsMapInDirectory = false; } This on Page Load //Temp folder for storing legend map and keymap temp files MapFunction = new RoulacGIS.MapFunctionality(this.Page, Server.MapPath(_AppSetting.TempFolder), _ AppSetting.TempFolder); //initialize map control //Load Map try { LoadMap(); } catch (Exception exp) { exp.Message.ToString(); } //this is separate method for accessing mapfile public void LoadMap() { MapFunction.Map = new mapObj(Server.MapPath(MapFile/) + _AppSetting.MapFilePath); } //create map instance I hope this will help you. Thanks and Regards, Venkat. From: valerio vianello [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2008 4:36 PM To: 'mapserver'; Venkat Rao Tammineni Subject: RE: [mapserver-users] disk space Thanks for the quick reply, When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ? best regards, Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:05 Hi, Why don’t you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio _ Scopri il http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! _ Scopri il http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver wms-client to tilecache / mapfile definition
Hello list users, I'm wanting to setup a mapfile with a WMS/Tilecache as source. Is this possible? I already tried several configurations, but i cannot get an image back. The problem is the resolutions and extents that are requested from mapserver (monitored the results from tilecache to mapserver with httpmonitor). Is there any way to give mapserver these parameters? Below the part of my mapfile that defines the layer with a tilecache as source. Thanks already for replies. Greetings Gerben LAYER NAME om TYPE RASTER STATUS ON CONNECTION http://myserver/tilecache/tilecache.py?; CONNECTIONTYPE WMS METADATA 'ows_title' 'om' wms_srs EPSG:28992 wms_nameom wms_server_version 1.1.1 wms_format image/png wms_extent -2,30,30,65 END END 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] mapserver MSVC2005 development package available to download (was mssql2008 binary test package available to download)
Here is my daily snapshot including the fast cgi support: http://vbkto.dyndns.org:1280/tests/release-1400-20081023.zip I've created a development package to compile mapserver from the sources: http://vbkto.dyndns.org:1280/tests/release-1400-dev.zip You can use the following steps to compile mapserver. 1. Extract the contents to a directory (for example C:\builds\release-1400-dev) 2. Open Microsoft Visual Studio 2005 Command Prompt 3. cd C:\builds\release-1400-dev 4. nmake -f makefile.vc ms MS_DIR=mapserver BASE_DIR=C:\builds\release-1400-dev 5. nmake -f makefile.vc ms-sql2008 MS_DIR=mapserver BASE_DIR=C:\builds\release-1400-dev 5. nmake -f makefile.vc ms-csharp MS_DIR=mapserver BASE_DIR=C:\builds\release-1400-dev This package is based on the development version of gdal and mapserver, but you can download the stable version of gdal and mapserver sources in the base directory if you require a stable version build In this case you must specify these directories for MS_DIR and GDAL_DIR at the command like, like: nmake -f makefile.vc gdal GDAL_DIR=gdal-1-5 BASE_DIR=C:\builds\release-1400-dev nmake -f makefile.vc ms MSL_DIR=mapserver-5-2 BASE_DIR=C:\builds\release-1400-dev If you require a corresponding package for the MSVC2003 based builds let me know. Best regards, Tamas 2008/10/20 BrainDrain [EMAIL PROTECTED]: Thank you very much, Tamas. getFeature works fine now. But can I ask you for one more favour. Could you compile with fastcgi support (ideally with all ms4w production release flags) or share 'your working buildkit' (this just will be great!, not only for me) because I still have problems with compiling ms4w(( but I need sql2008 support feature as soon as it possible for my work. I would be very appreciate. Tamas Szekeres wrote: Folks, Yes, I've run into the same issue when using the getFeature method with the driver. Here is the corresponding ticket I've created: http://trac.osgeo.org/mapserver/ticket/2795 Attached the C# test case with this ticket: http://trac.osgeo.org/mapserver/attachment/ticket/2795/Program.cs I've fixed this issue in the SVN-trunk and the stable branch, here is my daily snapsot of the binaries you can test with: http://vbkto.dyndns.org:1280/tests/release-1400-20081018.zip If you encounter further problems with the driver don't hesitate to file a ticket describing the issue. Just for a note: This driver doesn't make any character encodings with the values retieved as plain byte arrays from MSSQL, however your default database setting corresponds to the 1251 codepage, so explicit character conversion may be required in C#, like: byte[] bytes = Encoding.Convert(Encoding.Unicode, Encoding.Default, Encoding.Unicode.GetBytes(shape.getValue(k))); string str = Encoding.GetEncoding(1251).GetString(bytes); Best regards, Tamas 2008/10/17 BrainDrain [EMAIL PROTECTED]: hmm could you provide an example to this how can I help If I use mapscript? [WebService(Namespace = http://www.wem.volgadmin.ru/wemlib;)] [WebServiceBinding(ConformsTo = WsiProfiles.None)] [ScriptService] public class MapParser : System.Web.Services.WebService { [WebMethod(EnableSession = true)] [ScriptMethod(UseHttpGet = true)] public object RequestFeatureAttributes(object mapIndex, object layerIndex, int[] featureIndexes, string[] fieldNames, bool envelope) { mapObj map; layerObj layer = null; shapeObj shape; int entryIndex = -1, i, j, len = featureIndexes.Length; object[] res = new object[len]; Dictionarystring, object valueBag, record; if (Util.isNumeric(mapIndex.ToString(), NumberStyles.Integer)) { mapIndex = (object)Convert.ToInt32(mapIndex); } if (Util.isNumeric(layerIndex.ToString(), NumberStyles.Integer)) { layerIndex = (object)Convert.ToInt32(layerIndex); } KeyValuePairstring, object entry = Util.getEntry((Dictionarystring, object)Session[maps], (mapIndex.GetType() == typeof(int)) ? mapIndex : Util.normalizePath((string)mapIndex), out entryIndex); map = (mapObj)entry.Value;//.clone() if (layerIndex.GetType() == typeof(int)) { layer = map.getLayer((int)layerIndex); } else { if (layerIndex.GetType() == typeof(string)) { layer = map.getLayerByName((string)layerIndex); } } layer.open(); object def; Listint fieldIndexes = new Listint(); Liststring list = new Liststring(); if (fieldNames != null) { for (i = 0; i layer.numitems; i++) { if (((ICollectionstring)fieldNames).Contains(layer.getItem(i
Re: [mapserver-users] Mapserver wms-client to tilecache / mapfile definition
Not directly with Mapserver's built-in WMS client. You might get lucky with the GDAL WMS-C driver, but it has some assumptions (like all resolution ratios should be 2) that might not apply to your TileCache instance. http://gdal.org/frmt_wms.html Best regards, Bart Hello list users, I'm wanting to setup a mapfile with a WMS/Tilecache as source. Is this possible? I already tried several configurations, but i cannot get an image back. The problem is the resolutions and extents that are requested from mapserver (monitored the results from tilecache to mapserver with httpmonitor). Is there any way to give mapserver these parameters? Below the part of my mapfile that defines the layer with a tilecache as source. Thanks already for replies. Greetings Gerben LAYER NAME om TYPE RASTER STATUS ON CONNECTION http://myserver/tilecache/tilecache.py?; CONNECTIONTYPE WMS METADATA 'ows_title' 'om' wms_srs EPSG:28992 wms_nameom wms_server_version 1.1.1 wms_format image/png wms_extent -2,30,30,65 END END 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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Sorry but i still not understand... my scenario is client-server , in the server side I have a java servlet as an interface between the client and mapserver. now if i understood i would have to delete the tmp image on the server after the servlet send beck the answer to the client. But How I can be sure that the client download the image before I delete it ? Thanks Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:33 Hi, See after click or whatere it is …. OnOPageprerender Image will be creating an image. And after creation image will be deleting.what my project is doing the same.I am giving that code.. below… protected override void OnPreRender(EventArgs e) { LaodMainMap(ibMap); //Load MainMap by } public void LaodMainMap(System.Web.UI.WebControls.ImageButton imgMap) { MapFunction.Deleteimages();//delete Image form temp folder string imageLoc; string imageURL; imageObj imgRef; imgRef = MapFunction.Map.drawQuery(); imageLoc = MapFunction.OutputDir + / + System.DateTime.Now.ToBinary() + . + imgRef.format.extension; imageURL = imageLoc.Substring(imageLoc.IndexOf(MapFunction.OutputDirURL)); imgRef.save(imageLoc, null); ibMap.Width = imgRef.width; ibMap.Height = imgRef.height; ibMap.ImageUrl = imageURL; MapFunction.IsMapInDirectory = false; } This on Page Load //Temp folder for storing legend map and keymap temp files MapFunction = new RoulacGIS.MapFunctionality(this.Page, Server.MapPath(_AppSetting.TempFolder), _ AppSetting.TempFolder); //initialize map control //Load Map try { LoadMap(); } catch (Exception exp) { exp.Message.ToString(); } //this is separate method for accessing mapfile public void LoadMap() { MapFunction.Map = new mapObj(Server.MapPath(MapFile/) + _AppSetting.MapFilePath); } //create map instance I hope this will help you. Thanks and Regards, Venkat. From: valerio vianello [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2008 4:36 PM To: 'mapserver'; Venkat Rao Tammineni Subject: RE: [mapserver-users] disk space Thanks for the quick reply, When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ? best regards, Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:05 Hi, Why don’t you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! Scopri il blog di Yahoo! Mail: Trucchi, novità e scrivi la tua opinione. http://www.ymailblogit.com/blog___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problems With Google Earth WMS view
Hi David, can define a resolution for the output image? No, but your can change the image size ( height and width ) in your GE Link. Default values are 512 X 512. You could change those to 1024 X 1024 and you'll get a nicer image. problems with transparency on different zoom level Are you using your own WMS service ? If so, I don't know which OUTPUTFORMAT you're using but I had png with agg and didn't have this problem. If you have more than one image/png MIMETYPE, put this one on top. OUTPUTFORMAT NAME agg MIMETYPE image/png DRIVER AGG/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT ON FORMATOPTION INTERLACE=OFF END Hope this can helps. Cheers Alexandre David Martinez Morata wrote: Hello. I create a WMS for GE and I found some estrange things. In my Map file I don't define a background colour and I could like to be Transparent, but... At some levels I have the transparent image and at other levels I don't have it I don't really understand Wat is happening. I have 3 Layer in different zoom levels, The first One it's a line layer and the others are Points layers. And in some areas of my map I found problems with transparency If i put in some area i have the transparency but if i change a littel bit, the bacgruond becomes with. And just one question: can define a resolution for the output image? Thanks ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Alexandre Dubé Mapgears www.mapgears.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problems With Google Earth WMS view
Thanks a lot! With the outputformat thats OK , for the resloution it's better for me in 512X512. But it's a god thing to know. Thanks 2008/10/23 Alexandre Dube [EMAIL PROTECTED] Hi David, can define a resolution for the output image? No, but your can change the image size ( height and width ) in your GE Link. Default values are 512 X 512. You could change those to 1024 X 1024 and you'll get a nicer image. problems with transparency on different zoom level Are you using your own WMS service ? If so, I don't know which OUTPUTFORMAT you're using but I had png with agg and didn't have this problem. If you have more than one image/png MIMETYPE, put this one on top. OUTPUTFORMAT NAME agg MIMETYPE image/png DRIVER AGG/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT ON FORMATOPTION INTERLACE=OFF END Hope this can helps. Cheers Alexandre David Martinez Morata wrote: Hello. I create a WMS for GE and I found some estrange things. In my Map file I don't define a background colour and I could like to be Transparent, but... At some levels I have the transparent image and at other levels I don't have it I don't really understand Wat is happening. I have 3 Layer in different zoom levels, The first One it's a line layer and the others are Points layers. And in some areas of my map I found problems with transparency If i put in some area i have the transparency but if i change a littel bit, the bacgruond becomes with. And just one question: can define a resolution for the output image? Thanks ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Alexandre Dubé Mapgears www.mapgears.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Valerio, I think that most people just set up a cron job or a scheduled job on their server to delete all of the temporary images at some periodic interval. (e.g. 24hrs, 12hrs, 1hr) Your interfval would depend on the number of images that you are generating, disk space, etc. In the code that you use to delete the files, you may want to look at the timestamps on the images and only delete images that are at least 1 minute old, so you don't accidentally delete an image before it can be used by the page that called it. David. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 6:06 AM To: 'mapserver'; Venkat Rao Tammineni Subject: RE: [mapserver-users] disk space Thanks for the quick reply, When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ? best regards, Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:05 Hi, Why don't you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio Scopri il Blog di Yahoo! Mail http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F : trucchi, novità, consigli... e scrivi la tua opinione! Scopri il Blog di Yahoo! Mail http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F : trucchi, novità, consigli... e scrivi la tua opinione! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] result cache question
Dear List, I'm updating a spatial querying tool that follows a process something like: 1. Select set of shapes from layer A with n results: A[1-n] 2. Find shapes from layer B that within buffer distance D of selected shapes from A[1-n] In the existing code we get a result set of A[1-n], loop through the shapes and run the buffer query on B. Our result is then something like sum(BUFFER(Ai, B)) for i= 1..n. The same tool also supports other spatial queries...CONTAINS, INTERSECTS, etc...all with the same general process flow. The tool is PHP mapscript. Questions: 1. Is there a better approach? 2. Can I get a Min Bounding Rectangle of A[1-n] to pre-filter B? Would that help? Thanks, Josh ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[MAPSERVER-USERS] Get Number of features returned by extent change (zoom)
Dear all, I' m looking for a way to get the number of features (points) drawn by mapserver after a query on a specific BBOX, Is there a way do it? I would like to pass this number to a javascript after a zoom change wms query by openlayers. Thx for your attention. Djoblo -- View this message in context: http://www.nabble.com/Get-Number-of-features-returned-by-extent-change-%28zoom%29-tp20133664p20133664.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] Get Number of features returned by extent change(zoom)
Sure, the [NF] template tag will give you that number. You'd have to pass the bbox to MapServer with mode=nquery to get it. Steve On 10/23/2008 at 11:17 AM, in message [EMAIL PROTECTED], djoblo [EMAIL PROTECTED] wrote: Dear all, I' m looking for a way to get the number of features (points) drawn by mapserver after a query on a specific BBOX, Is there a way do it? I would like to pass this number to a javascript after a zoom change wms query by openlayers. Thx for your attention. Djoblo ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] railroad map file
Does anyone have a railroad .map file? I would prefer one that includes the railroad ties. The examples I found with google mostly came up with people having problems with them. Mark Volz GIS Specialist Lyon County, MN (507) 532-8218 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE : [mapserver-users] railroad map file
Here : CLASS STYLE SYMBOLpoint SIZE 5 COLOR 128 128 128 END STYLE SYMBOLpoint SIZE 3 COLOR 255 255 255 END STYLE SYMBOL ch_fer SIZE 8 COLOR 64 64 64 END END SYMBOL Name point Type Ellipse Filled TRUE Points 1 1 END END SYMBOL NAME ch_fer TYPE vector POINTS 0 0 0 7 -99 -99 7 0 7 7 END END __ 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] mailto:[EMAIL PROTECTED] -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Mark Volz Envoyé : 23 octobre 2008 13:57 À : mapserver-users@lists.osgeo.org Objet : [mapserver-users] railroad map file Does anyone have a railroad .map file? I would prefer one that includes the railroad ties. The examples I found with google mostly came up with people having problems with them. Mark Volz GIS Specialist Lyon County, MN (507) 532-8218 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] disk space
Thank you very much David... Valerio --- Gio 23/10/08, Fawcett, David [EMAIL PROTECTED] ha scritto: Da: Fawcett, David [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], mapserver mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 15:24 Message Valerio, I think that most people just set up a cron job or a scheduled job on their server to delete all of the temporary images at some periodic interval. (e.g. 24hrs, 12hrs, 1hr) Your interfval would depend on the number of images that you are generating, disk space, etc. In the code that you use to delete the files, you may want to look at the timestamps on the images and only delete images that are at least 1 minute old, so you don't accidentally delete an image before it can be used by the page that called it. David. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 6:06 AM To: 'mapserver'; Venkat Rao Tammineni Subject: RE: [mapserver-users] disk space Thanks for the quick reply, When you run this function? after each requests ? but if so, the client is able to read the image before you delete it ? best regards, Valerio --- Gio 23/10/08, Venkat Rao Tammineni [EMAIL PROTECTED] ha scritto: Da: Venkat Rao Tammineni [EMAIL PROTECTED] Oggetto: RE: [mapserver-users] disk space A: [EMAIL PROTECTED], 'mapserver' mapserver-users@lists.osgeo.org Data: Giovedì 23 ottobre 2008, 13:05 #yiv123248558 UNKNOWN { FONT-FAMILY:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} #yiv123248558 UNKNOWN { FONT-FAMILY:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} #yiv123248558 #yiv1232889979 #yiv1232889979 P.MsoNormal { FONT-SIZE:12pt;MARGIN:0in 0in 0pt;FONT-FAMILY:Times New Roman, serif;} #yiv123248558 #yiv1232889979 LI.MsoNormal { FONT-SIZE:12pt;MARGIN:0in 0in 0pt;FONT-FAMILY:Times New Roman, serif;} #yiv123248558 #yiv1232889979 DIV.MsoNormal { FONT-SIZE:12pt;MARGIN:0in 0in 0pt;FONT-FAMILY:Times New Roman, serif;} #yiv123248558 #yiv1232889979 A:link { COLOR:blue;TEXT-DECORATION:underline;} #yiv123248558 #yiv1232889979 SPAN.MsoHyperlink { COLOR:blue;TEXT-DECORATION:underline;} #yiv123248558 #yiv1232889979 A:visited { COLOR:purple;TEXT-DECORATION:underline;} #yiv123248558 #yiv1232889979 SPAN.MsoHyperlinkFollowed { COLOR:purple;TEXT-DECORATION:underline;} #yiv123248558 #yiv1232889979 SPAN.EmailStyle17 { COLOR:#1f497d;FONT-FAMILY:Calibri, sans-serif;} #yiv123248558 #yiv1232889979 .MsoChpDefault { } #yiv123248558 UNKNOWN { MARGIN:1in;} #yiv123248558 #yiv1232889979 DIV.Section1 { } Hi, Why don’t you write method for deleting png .mapserver will take care about creating an image.I have C# code. The below code will delete all the files form OutputDIR. I hope it helps you. Or At least you can get some idea about your task. Thanks and Regards Venkat. public void Deleteimages() { try { foreach (string f in System.IO.Directory.GetFiles(OutputDir)) { System.IO.File.Delete(f); } } catch (Exception exp) { } } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of valerio vianello Sent: Thursday, October 23, 2008 4:25 PM To: mapserver Subject: [mapserver-users] disk space Dear all, I have a demo where I'm using mapserver cgi interface. I'm using the browse mode so each time mapserver receive a request, it creates a temporary png on the server filesystem. Do you know how and when i can delete those temporary image since they are used only one time ? An attacker could easily fill all the server HD locking all the system. Thanks Valerio Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e scrivi la tua opinione! Scopri il blog di Yahoo! Mail: Trucchi, novità e scrivi la tua opinione. http://www.ymailblogit.com/blog___
RE: [mapserver-users] railroad map file
Mark, The old cartoline examples don't work with AGG. There was an example in the GIS/LIS workshop that uses a line style overlaid by a truetype pipe character. In the symbol definition, make sure that you set the gap with a negative value so the pipes will remain perpendicular to the line. David. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Volz Sent: Thursday, October 23, 2008 12:57 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] railroad map file Does anyone have a railroad .map file? I would prefer one that includes the railroad ties. The examples I found with google mostly came up with people having problems with them. Mark Volz GIS Specialist Lyon County, MN (507) 532-8218 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[MAPSERVER-USERS] How can i incorporate Cache?
Hello, I'm using Ajax in javascript for get Image Map. I wonder how can i incorporate cache with the image using ajax..like GoogleMap or Kmap when i do pan in there. Some one knows? Thank! -- View this message in context: http://www.nabble.com/How-can-i-incorporate-Cache--tp20137666p20137666.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] How can i incorporate Cache?
mhungc wrote: I'm using Ajax in javascript for get Image Map. I wonder how can i incorporate cache with the image using ajax..like GoogleMap or Kmap when i do pan in there. The most popular is TileCache. It's a WMS-C server. Of course, your AJAX request thing would have to be making WMS-C calls which it likely is not if you wrote it yourself. Another idea could be to roll your own, and that should be fairly easy. Replace your call to the mapserv binary with a call to a MapScript program that generates the same images. Then modify it to track the layer and extent, save a copy, and so on. In theory, fairly easy. :) -- 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
[mapserver-users] MS-SQL / OGR Query Length Problem
G'day all, In a nightmare scenario, to provide maximum flexibility for a client I am using php/mapscript (4.8) to generate and display mapfiles (not the nightmare bit) using OGR to connect to a MS-SQL Server (2003) Database... I would just like to say here the fact that this works is nothing short of brilliant. We can't use the mapserv.exe as they have a hang-up about security risks, but we can use php. Go figure! The real nightmare is in fact that we can get this all to work on the client's server, but can't work out how to do it locally (using ms4w and MSDE 2000), and so have very limited debugging information coming back to us - what we have been able to work out is that if we have a working file with multiple layers, the layers with short queries will work OK, but getting to a layer based on a long query breaks it. This was allowing us to create really great maps of all sorts of stuff (the database handles multiple projects), except when we made a seriously impressive SQL query (which returned exactly what we thought was right) the whole process died. Roughly, it would seem that between about 1600 and 1700 characters of SQL kills the process. It can be very simple query (just straight data), and shorter more complex queries work. cutting excess white space can make a difference. So, is it a limit of OGR or ODBC that I can't find any reference to. I can't see that it is a problem with SQL Server, and I have had (I think) longer SQL queries working using postgis... My question is, does anyone know where this might be breaking / happening? (bonus points if you know whether it is a configuration setting that we could tune!) cheers Ben -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 [EMAIL PROTECTED] Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MS-SQL / OGR Query Length Problem
Ben Madin wrote: Roughly, it would seem that between about 1600 and 1700 characters of SQL kills the process. It can be very simple query (just straight data), and shorter more complex queries work. cutting excess white space can make a difference. So, is it a limit of OGR or ODBC that I can't find any reference to. I can't see that it is a problem with SQL Server, and I have had (I think) longer SQL queries working using postgis... My question is, does anyone know where this might be breaking / happening? (bonus points if you know whether it is a configuration setting that we could tune!) Ben, I have reviewed the OGR ODBC driver and I see no obvious point at which a long query should be a problem. I have also skimmed the MapServer core and php_mapscript code and I see no obvious problem. I assume you are placing the SQL query in the DATA statement in the map file? I would suggest a few steps to try and isolate this: o See if you can reproduce it against other ODBC datasources. o See if you can reproduce it with mapserv instead of php_mapscript o See if you can reproduce it with just OGR and no MapServer. If you can reproduce the problem in a form that I can run at my end without undue complexity, I'd be willing to dig in somewhat deeper. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] 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
[mapserver-users] Re: MS-SQL / OGR Query Length Problem
Thanks Frank, On 24/10/2008, at 11:47 AM, Frank Warmerdam wrote: I assume you are placing the SQL query in the DATA statement in the map file? No... In the connection part as I wanted to avoid writing a text file and then referencing it in the mapfile. This is a layer that is working as anticipated - the SQL part is only 927 characters. (I realise I probably should have included this before - the SQL is gross, but returns just the resultvalue, lat and long.) LAYER CLASSITEM outcome CONNECTION OGRVRTDataSource OGRVRTLayer name='data' SrcDataSourceODBC:web_user/[EMAIL PROTECTED]/SrcDataSource SrcSQLselect case when res1.resultvalue gt;= 1 then 'positive' when res1.resultvalue lt; 1 then 'negative' end as outcome, s.latitude as latitude, s.longitude as longitude from reports rep join results res1 on (res1.reportid = rep.id and res1.resulttypeid = 59 and res1.del=0) join results ft_388 on (rep.id = ft_388.reportid and ft_388.resulttypeid = 60 and ft_388.del=0) join sites s on rep.site like s.sitecode and s.del = 0 and s.latitude is not null and s.longitude is not null where rep.projectid = 41 and ft_388.resultvalue in (400) and (((startdate is not null and enddate is not null) and (startdate gt;= '2008-07-01' and enddate lt;= '2008-09-30')) or ((startdate is not null and enddate is null) and (startdate gt;= '2008-07-01' and startdate lt;= '2008-09-30')) or ((startdate is null and enddate is not null) and (enddate gt;= '2008-07-01' and enddate lt;= '2008-09-30'))) and rep.del = 0 order by outcome DESC/SrcSQL GeometryTypewkbPoint/GeometryType GeometryField encoding='PointFromColumns' x='longitude' y='latitude'/ /OGRVRTLayer /OGRVRTDataSource CONNECTIONTYPE OGR DATA data GROUP Sites METADATA END NAME Changes SIZEUNITS PIXELS STATUS DEFAULT TOLERANCEUNITS PIXELS TYPE POINT UNITS METERS CLASS NAME Positive EXPRESSION positive LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS FALSE POSITION AUTO END METADATA END STYLE ANGLE 360 COLOR 255 0 0 SIZE 10 SYMBOL 1 END STYLE ANGLE 360 COLOR 255 0 0 OUTLINECOLOR 255 255 255 SIZE 5 SYMBOL 1 END END CLASS NAME Negative EXPRESSION negative LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS FALSE POSITION AUTO END METADATA END STYLE ANGLE 360 COLOR 0 0 255 SIZE 10 SYMBOL 1 END STYLE ANGLE 360 COLOR 0 0 255 OUTLINECOLOR 255 255 255 SIZE 5 SYMBOL 1 END END END I would suggest a few steps to try and isolate this: o See if you can reproduce it against other ODBC datasources. o See if you can reproduce it with mapserv instead of php_mapscript o See if you can reproduce it with just OGR and no MapServer. If you can reproduce the problem in a form that I can run at my end without undue complexity, I'd be willing to dig in somewhat deeper. I will try the steps you have outlined above - it's fairly torturous process to get things changed on the client server, so it might take some time, I will keep you updated. cheers Ben -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 [EMAIL PROTECTED] Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users