[Geomoose-users] Re: printing in geomoose

Brent Fraser bfraser at geoanalytic.com
Thu May 24 09:57:53 EDT 2012


     If you read the doc at http://www.gdal.org/frmt_wms.html you will 
see that it is possible to enable cache using <cache> block in your GDAL 
WMS XML.  If you are using my OSM_TAH.map/.xml as a guide, this will 
cache the image tiles created/stored by OpenStreetMap and requested by 
your server via mapserver/gdal.  You are basically using mapserver as a 
TMS client and having it render the tiles into one image to send to the 
browser.  This approach works well for aerial/satellite imagery server 
up in tiles, but not very well for "street" maps because the image tiles 
are resampled as they are written into the output image.  This can lead 
to unreadable text labels and other resampling artifacts, but it is 
quick to set up.

     The approach given at 
http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu is totally 
different.  It describes how to get the original VECTOR data (not the 
rendered image tiles) from OpenStreetMap and render it yourself on your 
server.  I think this a superior approach since it doesn't rely on the 
OSM server performance (and you can create your own rendering styles), 
but takes a lot more effort to set up.

     Perhaps some of the other GeoMoose (or mapserver?) users would have 
more info on setting up mapcache...

Best Regards,
Brent Fraser


On 5/24/2012 5:20 AM, Radoslav Melicher wrote:
> Hi, Brent.
> Thanks for your help me with printing problem, it works now. Almost everything is great.
> I just want to ask you if you know of some way to cache the OSM_TAH.map and use those tiles in geomoose for printing...
> I want to try to make it faster, viewing and printing. So, is there a way how to achieve it?
> I set up a mapcache according to this manual http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu.
> And I also have tiles in my cache dir, so how to serve them into the geomoose 2.4?
>
> Thanks for your help, again
>
> Have a nice day
>
> Best Regards,
>
> Radoslav Melicher
>
>
>
> ----- Original Message -----
> From: "Brent Fraser"<bfraser at geoanalytic.com>
> To: "Radoslav Melicher"<melicherr at kolektory.cz>
> Sent: Wednesday, May 16, 2012 7:08:56 PM
> Subject: Re: printing in geomoose
>
> These are mapserver errors.
> 1. Your PROJECTION definition is wrong. (some Googling will show you the
> right way).
> 2. mapserver v6 introduced changes to the symbology file (GAP,
> STYLE/PATTERN)
> http://mapserver.org/MIGRATION_GUIDE.html#mapserver-5-6-to-6-0-migration
>
> Best Regards,
> Brent Fraser
>
>
> On 5/16/2012 10:47 AM, Radoslav Melicher wrote:
>> Hi, Brent.
>>
>> It's me again. What you suggested me to add to geomoose_globals.map didn't work. I am thinking of trying to reinstall all the pieces and make it work, maybe I did some stupidities.
>> May I ask you about using geoserver with geomoose, when I set it up, it should be okey? I tried it but there was the error saying sth about referenced envelope, that I am trying to print sth with no area and the coordinates Xmin = Xmax and Ymin=Ymax. Same as I mentioned before in this "thread"
>>
>> And I want to ask one more question. I wrote a mapfile, fik.map, which is attached. It is for some shapefile, but now it doesn't matter. When I us it as it is in geomoose, i get pink screen.. There is also error message:
>>
>> "msProcessProjection(): Projection library error. no system list, errno: 2"
>>
>> in my ms_error.txt file.  So I put a '#' symbol in front of this line in PROJECTION section
>>
>>     'init=epsg:WGS84'
>>
>> And I get also this error:
>>
>> loadSymbol(): Unknown identifier. Parsing error near (GAP):(line 9)
>>
>> so I coppied symbol.sym to symbol_OSM.sym and comment out all the lines with GAP and STYLE in it and changed appropriate line:
>>
>> SYMBOLSET '/opt/geomoose2/maps/symbols/symbol_OSM.sym'
>>
>> to make it work... And now, when I turn this map in geomoose on, it goes blank (simply white), and it says nothing in any log, but the shapefile is not there. And what is weird is this:
>> Before these changes, when I turn the layer on and view the legend of layer, there was nothing shown, now, though, there is some green curve, as it usually is, when the layer is OK.
>>
>> I just want to ask you if you know where could be a problem hidden? Or possibly it gives you clue to work out my other problems.
>>
>> I hope I wrote this clear and you can understand, and I am also very sorry for still disturbing you, but have no clue where to find solutions, I am googling all the time and read the whole topics on some forums but to no success. And I think you are really good at this stuff.
>>
>> So thank you very much for your precious time and energy you put in helping me with all this.
>>
>>
>> Best Regards
>>
>> Radoslav Melicher
>>
>>
>>
>>
>> ----- Original Message -----
>> From: "Brent Fraser"<bfraser at geoanalytic.com>
>> To: "Radoslav Melicher"<melicherr at kolektory.cz>
>> Cc: "GeoMOOSE Users List"<geomoose-users at lists.osgeo.org>
>> Sent: Sunday, May 13, 2012 1:36:47 AM
>> Subject: Re: printing in geomoose
>>
>> The line you are referring to is (around) line 151 in print_util.php:
>>
>> //LK To allow use of AGG in onscreen and set to GD for print
>> $url = $url . '&map_IMAGETYPE=print' ;
>>
>> I'm not sure I'd call it a bug, but it is an un-documented feature. It expects something like
>>
>> OUTPUTFORMAT NAME "print" DRIVER GD / GIF MIMETYPE "image/gif" IMAGEMODE PC256 EXTENSION "gif" END to be in your geomoose_globals.map
>>
>> Best Regards,
>> Brent Fraser
>> On 5/12/2012 4:44 PM, Radoslav Melicher wrote:
>>
>> I am using geomoose 2.4 and mapserver 6.0.2 on ubuntu 10.04...
>>
>> Thx
>>
>> Best Regards
>>
>> Radoslav Melicher
>>
>> ----- Original Message -----
>> From: Brent Fraser<bfraser at geoanalytic.com>   To: Radoslav Melicher<melicherr at kolektory.cz>   Sent: Sat, 12 May 2012 15:13:42 +0200 (CEST)
>> Subject: Re: printing in geomoose
>>
>> Which version of GeoMoose are you using?  Which version of Mapserver?
>>
>> And the mailing list has been changed to a new server :  GeoMOOSE Users
>> List<geomoose-users at lists.osgeo.org>   Best Regards,
>> Brent Fraser
>>
>>
>> On 5/11/2012 8:21 AM, Radoslav Melicher wrote:
>>
>> Hi, Brent.
>>
>> Sorry, for making a stupid mistake. I changed that when I realize that the originally used server went down. Now, I can see the layer when I select it, but when printing, it throws errors mentioned before.
>> I tried to change the print_util.php file (cannot remmeber line) where there is IMAGETYPE (there's only one I think) and changed print for something else, i. e. sprint, and then the error messages changed acoording to change. But now I don't know why is the error occuring, because I haven't changed print_util.php before. And when I tried to comment that line with IMAGETYPE=print in print_util.php it throws exactly same errors as I experience when trying to print layers from geoserver. You can see them here: http://osgeo-org.1560.n6.nabble.com/printing-in-geomoose-td4684481.html In that time I thought there is problem in comunication between geomoose and geoserver, but now, when I commented that line out, it is the same with the mapserver. So, maybe I just need to solve this problem and I will be at good point.
>> Thanks very much indeed for your help
>>
>> Best Regards,
>>
>> Radoslav Melicher
>>
>>
>>
>> ----- Original Message -----
>> From: "Brent Fraser"<bfraser at geoanalytic.com>   To: "Radoslav Melicher"<melicherr at kolektory.cz>   Sent: Thursday, May 10, 2012 4:59:55 PM
>> Subject: Re: printing in geomoose
>>
>> A likely cause is that the Tiles At Home () server is no longer
>> available.  I now use MapQuest's OSM tiles
>> ( http://wiki.openstreetmap.org/wiki/MapQuest )
>>
>> So in your XML file, replace http://tah.openstreetmap.org/Tiles/tile/$ {z}/${x}/${y}.png
>>
>> with: http://otile1.mqcdn.com/tiles/1.0.0/osm/$ {z}/${x}/${y}.jpg
>>
>>
>>
>> Best Regards,
>> Brent Fraser
>>
>>
>> On 5/10/2012 6:45 AM, Radoslav Melicher wrote:
>>
>> Hi, Brent.
>>
>> Excuse me for disturbing you, but I am unable to write a new topic to geomoose users forum.
>> Couple of months ago, you sent me some files to use for printing the OSM tiles. Many thanks again. Since that time I was coping another projects and stuff. Now I got back to it. As you, probably, remember I had a problem with printing in geomoose using geoserver. It still is there, but now I tried a new approach, I set up mapserver and make it work. It looks like it is okey now.
>> But I still have problem with printing in geomoose, even using only the attached files server through mapserver.
>> In ms_error.txt on my server I have errors saying:
>>
>> [Thu May 10 14:20:08 2012].129895 msPostMapParseOutputFormatSetup(): General error message. Unable to select IMAGETYPE `print'.
>> [Thu May 10 14:20:08 2012].367570 msPostMapParseOutputFormatSetup(): General error message. Unable to select IMAGETYPE `print'.
>>
>> Each time I try to print OSM_TAH.map there are these two lines again and again and I can see only blank PDF, jpeg or html. I don't know why there are 2 same errors. And I cannot figure out why there is IMAGETYPE 'print'. I tried to use firebug, but for printing it's useless, there is nothing.
>> I have also tried this manual http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu . It throws the same errors each time I try to print the layer and the PDF, jpeg and html files are all blank. I can see these layers when I turn them on in geomoose, but when I print them these errors occur.
>> And I have another (probably) stupid question. When I am using anyone of these two layers and I am moving the view or zoom level, they are acting weird, because when I zoom, usually I can see just a piece of zoomed area, or when I move the map to whichever side it usually return back where it was before moving or move  in the other direction...
>>
>> Excuse me once more, I know you all have a lot of work. If it is possible, can you at least help me to be able to write a new topic in the geomoose users forum?
>>
>> Many many thanks
>>
>> Best Regards
>>
>> Radoslav Melicher
>>
>>
>>
>> ----- Original Message -----
>> From: "Brent Fraser"<bfraser at geoanalytic.com>   To: melicherr at kolektory.cz Sent: Monday, December 19, 2011 4:58:16 PM
>> Subject: Re: printing in geomoose
>>
>> see attached files...
>>
>> Best Regards,
>> Brent Fraser
>>
>>
>> On 12/19/2011 8:55 AM, melicherr at kolektory.cz wrote:
>>
>> Hi there. You replied to my post about problems with printing. I have hardly ever used a map file, so what you are suggesting here ( http://www.osgeo.org/pipermail/geomoose-users/2010-July/002435.html ) is a little bit problematic for me. I tried to write a map file with layer of openstreetmap tiles. I wanted to use it as a base layer with possibility to print. But i wasn't successful.
>> Can you send me a map file or some template how it looks like for this purpose?
>> thank you very much
>



More information about the Geomoose-users mailing list