AW: [mapserver-users] Open Layers Problem
your server http://173.236.45.118/cgi-bin/mapserv?map=/home/bicimapas/mapdata/BiciMapasM S.map works also well with OpenLayers. This should show your server with OpenLayers: http://gis.ibbeck.de/olclient/OLClient.asp?WMC=./data/WMC/BiciMapasMS.wmc.xm l Perhaps you use not the right zoomlevel in OpenLayers to see anything. I have to use zoomlevel 16 to see something. by the way also you have corrected it, the mapfile path have to be a filesystem path and not an url. Arnd _ Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Alberto Najera Gesendet: Samstag, 28. April 2012 05:17 An: mapserver-users@lists.osgeo.org Betreff: RE: [mapserver-users] Open Layers Problem Brent, Thanks for testing it. The "home/bicimapas/" path is the webserver directory tree. As a fact this same test map works well using the Mapserver templates as you can test with this link http://173.236.45.118/bcmpms_i.html which is the initialization page. Press "Acceder" and you will be taken to the map. The question here is why can the Mapserver template can access the file while OpenLayers does not. Is there a reference document or tutorial on how to properly set up OpenLayers to work with Mapserver? Alberto Najera De: pcr...@pcreso.com [mailto:pcr...@pcreso.com] Enviado el: viernes, 27 de abril de 2012 07:26 p.m. Para: mapserver-users@lists.osgeo.org; Alberto Najera Asunto: RE: [mapserver-users] Open Layers Problem Hi Alberto, I can get the capabilities document, & a list of available layers, using the WMS facility in Quantum GIS, but when I try to access/load the layers as a map the request fails: "Response: MapServer Message msLoadMap(): Unable to access file. (http://173.236.45.118/home/bicimapas/mapdata/BiciMapasMS.map) " I suggest that having your mapfile in your home directory tree rather than your webserver's directory tree might be the problem. You might also try tools like uDIG or QGIS to access the WMS service & debug it before you try to get it working with OpenLayers. Cheers, Brent Wood ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] help - mapserver and postgis connection
Ha! First timer here... I put my database name into the host= part, and didn't even have dbname= now that I do, it works!!! Wow! Fantastic!! Date: Sat, 28 Apr 2012 12:33:39 -0700 From: pcr...@yahoo.com Subject: Re: [mapserver-users] help - mapserver and postgis connection To: stwo...@hotmail.com What happens if you use the IP address instead of the hostname? --- On Sun, 4/29/12, Sean Twomey wrote: From: Sean Twomey Subject: [mapserver-users] help - mapserver and postgis connection To: mapserver-users@lists.osgeo.org Date: Sunday, April 29, 2012, 7:15 AM I have had success in displaying my layers from a shapefile folder, but can't re-create from the POSTGIS database. I changed my pg_hba.conf file to this... host DATABASE USER CIDR-ADDRESS METHOD host all all 0.0.0.0/0 md5 and this: host all all 142.232.0.1/16 md5 both postgresql.conf file are set to listen to '*' and I have flopped from port 5432 (v. 9.1) to 5433 (v. 8.4), I apparently have both postgresql 8.4 and 9.1 running... I constantly get this: msDrawMap(): Image handling error. Failed to draw layer named 'en_grantedonly_soionly'. msPostGISLayerOpen(): Query error. Database connection failed (could not translate host name "htgProject" to address: Name or service not known ) with connect string 'host=htgProject port=5432 user=stwomey password=*' Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? Ideas? Very challenging!! Sean -Inline Attachment Follows- ___ 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] help - mapserver and postgis connection
I have had success in displaying my layers from a shapefile folder, but can't re-create from the POSTGIS database. I changed my pg_hba.conf file to this... host DATABASE USER CIDR-ADDRESS METHOD host all all 0.0.0.0/0 md5 and this: host all all 142.232.0.1/16 md5 both postgresql.conf file are set to listen to '*' and I have flopped from port 5432 (v. 9.1) to 5433 (v. 8.4), I apparently have both postgresql 8.4 and 9.1 running... I constantly get this: msDrawMap(): Image handling error. Failed to draw layer named 'en_grantedonly_soionly'. msPostGISLayerOpen(): Query error. Database connection failed (could not translate host name "htgProject" to address: Name or service not known ) with connect string 'host=htgProject port=5432 user=stwomey password=*' Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? Ideas? Very challenging!! Sean ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Really slow map creation from POSTGIS DB
On 04/28/2012 14:44, Matt McClelland wrote: Hi All I have a set of contours in a SHP file If I point my map file to the SHP file I can generate a WMS image in under 1 second Shp file is just shy of 200MB I then use shp2pgsql to load the same dataset into the DB I added an index for the_geom And am requesting the data in the mapfile using the same EPSG The map draws correclty but is now taking about 30secs when using the DB. are you sure your postgresql is well configured ? can you pastebin your postgresql.conf and some details about your configuration ? Any ideas on how to make it faster. Thanks Matt :) ___ 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] Really slow map creation from POSTGIS DB
On 4/28/2012 9:44 AM, Puneet Kishor wrote: On Apr 28, 2012, at 8:20 AM, Stephen Woodbridge wrote: On 4/28/2012 8:44 AM, Matt McClelland wrote: Hi All I have a set of contours in a SHP file If I point my map file to the SHP file I can generate a WMS image in under 1 second Shp file is just shy of 200MB I then use shp2pgsql to load the same dataset into the DB I added an index for the_geom And am requesting the data in the mapfile using the same EPSG The map draws correclty but is now taking about 30secs when using the DB. Any ideas on how to make it faster. Simplify the data for the that zoom level. If you are all the way zoomed out and drawing all the data, then the shapefile will be fastest. An index does not help if you are drawing all the data as you need to do a full table scan anyway to get all the records. It is simply faster to read 200MB from disk than from the database because the database has to fetch the same data and may have to jump through some hoops to get it out of extended storage, then it has to encode the data and send it over the connection and the client has to decode the data. Do you really need all the resolution of the data at this scale? If not create another column and simplify the geometry into that column and set up your mapfile to query the simplified data at this zoom and to query the detailed data as you zoom in. All of the above is great advice. Additionally, implement a tilecache server; why redraw an image if it has already been drawn. That said, while a db is going to be slower than the file system in many cases, there are many reasons why your db is performing so slowly. Thirty times slow is too much, and 30s for a query, no matter what query, is wrong. Benchmark your entire stack to find bottlenecks... Is the query itself taking that long? Is something else going wrong? Is the exact query that MapServer is performing actually using your indexes? In pgAdmin or from the psql commandline, how long does it take to do: select * from yourtable; Do you have the exact query that mapserver is making? You can get it by adding to the MAP object DEBUG 10 CONFIG MS_ERRORFILE "stderr" then looking in the apache error_log. -Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Really slow map creation from POSTGIS DB
On Apr 28, 2012, at 8:20 AM, Stephen Woodbridge wrote: > On 4/28/2012 8:44 AM, Matt McClelland wrote: >> Hi All >> >> I have a set of contours in a SHP file >> If I point my map file to the SHP file I can generate a WMS image in >> under 1 second >> Shp file is just shy of 200MB >> >> I then use shp2pgsql to load the same dataset into the DB >> I added an index for the_geom >> And am requesting the data in the mapfile using the same EPSG >> >> The map draws correclty but is now taking about 30secs when using the DB. >> >> Any ideas on how to make it faster. > > Simplify the data for the that zoom level. > > If you are all the way zoomed out and drawing all the data, then the > shapefile will be fastest. An index does not help if you are drawing all the > data as you need to do a full table scan anyway to get all the records. It is > simply faster to read 200MB from disk than from the database because the > database has to fetch the same data and may have to jump through some hoops > to get it out of extended storage, then it has to encode the data and send it > over the connection and the client has to decode the data. > > Do you really need all the resolution of the data at this scale? If not > create another column and simplify the geometry into that column and set up > your mapfile to query the simplified data at this zoom and to query the > detailed data as you zoom in. All of the above is great advice. Additionally, implement a tilecache server; why redraw an image if it has already been drawn. That said, while a db is going to be slower than the file system in many cases, there are many reasons why your db is performing so slowly. Thirty times slow is too much, and 30s for a query, no matter what query, is wrong. Benchmark your entire stack to find bottlenecks... Is the query itself taking that long? Is something else going wrong? Is the exact query that MapServer is performing actually using your indexes? -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Really slow map creation from POSTGIS DB
On 4/28/2012 8:44 AM, Matt McClelland wrote: Hi All I have a set of contours in a SHP file If I point my map file to the SHP file I can generate a WMS image in under 1 second Shp file is just shy of 200MB I then use shp2pgsql to load the same dataset into the DB I added an index for the_geom And am requesting the data in the mapfile using the same EPSG The map draws correclty but is now taking about 30secs when using the DB. Any ideas on how to make it faster. Simplify the data for the that zoom level. If you are all the way zoomed out and drawing all the data, then the shapefile will be fastest. An index does not help if you are drawing all the data as you need to do a full table scan anyway to get all the records. It is simply faster to read 200MB from disk than from the database because the database has to fetch the same data and may have to jump through some hoops to get it out of extended storage, then it has to encode the data and send it over the connection and the client has to decode the data. Do you really need all the resolution of the data at this scale? If not create another column and simplify the geometry into that column and set up your mapfile to query the simplified data at this zoom and to query the detailed data as you zoom in. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Really slow map creation from POSTGIS DB
Hi All I have a set of contours in a SHP file If I point my map file to the SHP file I can generate a WMS image in under 1 second Shp file is just shy of 200MB I then use shp2pgsql to load the same dataset into the DB I added an index for the_geom And am requesting the data in the mapfile using the same EPSG The map draws correclty but is now taking about 30secs when using the DB. Any ideas on how to make it faster. Thanks Matt :) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How I get image high quality for print?
Hi, Try map_resolution parameter. There is an example images at last pages of document http://latuviitta.org/documents/Super_easy_WMS_server.pdf -Jukka Rahkonen- mmypost wrote: > Hi! > Sorry for my bad English. > I have a problem with image quality. I create image by mapserver and then print it. I set 300dpi resolution, but some truetype symbols was not visible in image (if image 96 dpi or default resolution,then the truetype symbols is visible). Some symbols has poor quality. I attempted to create images with different size. Can I to get high quality image for print? Version mapserver 6.2 Yours sincerely, Sev ___ 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] How I get image high quality for print?
Hi! Sorry for my bad English. I have a problem with image quality. I create image by mapserver and then print it. I set 300dpi resolution, but some truetype symbols was not visible in image (if image 96 dpi or default resolution,then the truetype symbols is visible). Some symbols has poor quality. I attempted to create images with different size. Can I to get high quality image for print? Version mapserver 6.2 Yours sincerely, Sev ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users