[mapserver-users] projecting in degrees
I have shapefiles that are stored in degrees and they are displayed in degrees if there are no projections in the mapfile. When displayed like this, they look like UTM world projection. However, I need to display it in old style mercator where greenland is really big. I can get mapserver to project as mercator, but it always converts to meters. I would like to project my shapefiles in degrees. Is this possible? I need to because I handle extents and annotation points in degrees. Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] shp/dbf file's name
If I understand your question correctly you are attempting to do something similar to what I have where I am coloring polygons in a shapefile based on a numeric value stored in a frequently-updated CSV-file. As long as you have a field in both files that you can join on it ought to work. I used the OGR connection type as briefly discussed in a previous post, http://www.mail-archive.com/mapserver-us...@lists.umn.edu/msg13477.html This is the type of syntax you appear to need: CONNECTIONTYPE OGR CONNECTION "/var/www/demodata/a.shp" //path to the shapefile DATA "SELECT a.ID, b.NAME FROM a LEFT JOIN '/var/www/demodata/b.dbf'.b ON a.ID=b.ID" In my case the LAYER section in the mapfile looks like this, where "FIPS" is the field I join the files on. LAYER NAME 'parishes_on_boiladv' CONNECTIONTYPE OGR CONNECTION "myshapefile.shp" DATA "SELECT * FROM myshapefile LEFT JOIN 'full_path_to_file_named_bwa.csv'.bwa ON myshapefile.FIPS = bwa.FIPS" STATUS on TYPE polygon CLASSITEM "PercentageOut" CLASS EXPRESSION ([PercentageOut] > 0 AND [PercentageOut] <= 10) NAME "0 - 10%" STYLE COLOR 56 168 0 END END #class (continues with several more classes). Hope that helps, Johan. > -Original Message- > From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- > boun...@lists.osgeo.org] On Behalf Of Clément MONIER > Sent: Friday, August 20, 2010 9:06 AM > To: P Kishor > Cc: mapserver-users@lists.osgeo.org > Subject: RE: [mapserver-users] shp/dbf file's name > > > How would MapServer know which row in your external dbf file matches > which row (aka feature) in your ShapeFile? > > What if the external dbf file doesn't have the same number of rows as > the number of features in your ShapeFile? > > not really a problem as I'm able to generate dbf files with records in > exactly same number and order as inside shp. > > > > The dbf format is pretty primitive. Your best bet is to actually add to > your ShapeFile the data that is now in your external file. > It will also > likely be faster. > > That's precisely what I can't do any more, > since I'd like to join various kinds of time-related attributes on very > static geometries. > > -Message d'origine- > De : P Kishor [mailto:punk.k...@gmail.com] > Envoyé : vendredi 20 août 2010 15:42 > À : Clément MONIER > Cc : mapserver-users@lists.osgeo.org > Objet : Re: [mapserver-users] shp/dbf file's name > > On Fri, Aug 20, 2010 at 8:22 AM, Clément MONIER > wrote: > > Hi, > > > > > > > > I would like to know if it's possible to draw geometries from a shp file > > > > according to attributes from a dbf > > > > but with 2 files named differently. > > > > > > > > For instance : > > > > > > > > LAYER > > > > NAME layer1 > > > > DATA shapefile1.shp > > > > CLASS > > > > EXPRESSION ([col1]=1) > > > > STYLE > > > > END > > > > END > > > > END > > > > > > > > Where col1 is a field inside a file storing attributes (dbf/csv/txt/.) > but > > not named shapefile1.dbf > > > > > How would MapServer know which row in your external dbf file matches > which row (aka feature) in your ShapeFile? What if the external dbf > file doesn't have the same number of rows as the number of features in > your ShapeFile? > > The dbf format is pretty primitive. Your best bet is to actually add > to your ShapeFile the data that is now in your external file. It will > also likely be faster. > > > > > > > > I already tried to use the JOIN option but I think it's inappropriate > for my > > purpose > > > > since "You cannot use joins to affect the look of a map" > > (http://mapserver.org/mapfile/join.html) > > > > > > > > Thanks for your help ! > > > > > > > > Clément > > > > > > > > ___ > > mapserver-users mailing list > > mapserver-users@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > > > -- > Puneet Kishor http://www.punkish.org > Carbon Model http://carbonmodel.org > Charter Member, Open Source Geospatial Foundation http://www.osgeo.org > Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor > Nelson Institute, UW-Madison http://www.nelson.wisc.edu > --- > Assertions are politics; backing up assertions with evidence is science > === > ___ > 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] maps all look squished
I'm wondering how the maps are being displayed. The original sample looked like there was a x-stretch. Perhaps there's a difference between the display size and the actual image size resulting in the squish? -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka Sent: Friday, August 20, 2010 10:54 AM To: Josh Jordan; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] maps all look squished Hi, I am pretty sure that it is a projection problem. Open your shapefiles with some GIS program like QGis or OpenJUMP and you will see that they look the same as your Mapserver output. If you want the output look different you must set Mapserver to reproject the data. It is possible only if you can tell in the mapfile correctly what is the projection of the input data. If your shapefiles are missing the .prj files it is best to ask about the projection from the one one who has created the data. Changing the projection parameter in both the input and output does not have any effect because then Mapserver just allways sees that input and output are the same and therefore there is nothing to do, just push the raw data ahead. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 18:37 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished When I change the extents, it will always zoom out so it can fit everything in the extent in the window. So if I change the extent to be only a thin vertical line it makes no difference. Changing the size makes no difference, it was 500 600, I changed it to 100 5000 and 5000 100 and there is no difference. --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 11:22 AM Hi, I have never used any MabObj things, only shp2img, Mapserver CGI and WMS clients. However, I guess that your system is taking the EXTENTS from your mapfile as well as SIZE. If you change the output projection without changing extents you will see nothing because the view window is no more in the same place as the data are. And SIZE parameters can squeese your image, play with them and see. -Jukka- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 17:24 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished The projection in the mapfile is "init=epsg:2023". This is the same projection between /MAP/,/END/ as it is for all the projections between /LAYER/,/END/. When the projection of a layer is not the same as the projection of the map, the layer does not print. It seems redundant to have to write the same projection everywhere. I request the map image with:ms_newMapObj($PM_MAP_FILE); --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 8:04 AM Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ 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] maps all look squished
Hi, I am pretty sure that it is a projection problem. Open your shapefiles with some GIS program like QGis or OpenJUMP and you will see that they look the same as your Mapserver output. If you want the output look different you must set Mapserver to reproject the data. It is possible only if you can tell in the mapfile correctly what is the projection of the input data. If your shapefiles are missing the .prj files it is best to ask about the projection from the one one who has created the data. Changing the projection parameter in both the input and output does not have any effect because then Mapserver just allways sees that input and output are the same and therefore there is nothing to do, just push the raw data ahead. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 18:37 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished When I change the extents, it will always zoom out so it can fit everything in the extent in the window. So if I change the extent to be only a thin vertical line it makes no difference. Changing the size makes no difference, it was 500 600, I changed it to 100 5000 and 5000 100 and there is no difference. --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 11:22 AM Hi, I have never used any MabObj things, only shp2img, Mapserver CGI and WMS clients. However, I guess that your system is taking the EXTENTS from your mapfile as well as SIZE. If you change the output projection without changing extents you will see nothing because the view window is no more in the same place as the data are. And SIZE parameters can squeese your image, play with them and see. -Jukka- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 17:24 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished The projection in the mapfile is "init=epsg:2023". This is the same projection between /MAP/,/END/ as it is for all the projections between /LAYER/,/END/. When the projection of a layer is not the same as the projection of the map, the layer does not print. It seems redundant to have to write the same projection everywhere. I request the map image with:ms_newMapObj($PM_MAP_FILE); --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 8:04 AM Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] maps all look squished
When I change the extents, it will always zoom out so it can fit everything in the extent in the window. So if I change the extent to be only a thin vertical line it makes no difference. Changing the size makes no difference, it was 500 600, I changed it to 100 5000 and 5000 100 and there is no difference. --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 11:22 AM Hi, I have never used any MabObj things, only shp2img, Mapserver CGI and WMS clients. However, I guess that your system is taking the EXTENTS from your mapfile as well as SIZE. If you change the output projection without changing extents you will see nothing because the view window is no more in the same place as the data are. And SIZE parameters can squeese your image, play with them and see. -Jukka- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 17:24 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished The projection in the mapfile is "init=epsg:2023". This is the same projection between /MAP/,/END/ as it is for all the projections between /LAYER/,/END/. When the projection of a layer is not the same as the projection of the map, the layer does not print. It seems redundant to have to write the same projection everywhere. I request the map image with:ms_newMapObj($PM_MAP_FILE); --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 8:04 AM Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: refactoring STYLEs ?
It works great ! Thanks a lot De : Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] Envoyé : vendredi 20 août 2010 17:25 À : Clément MONIER; 'mapserver-users@lists.osgeo.org' Objet : RE: refactoring STYLEs ? There's a draft RFC floating around to support this but it hasn't gotten much love... You can use INCLUDEs to do something similar: Main mapfile: LAYER NAME layer1 CLASS INCLUDE 'style1.map' END END LAYER NAME layer2 CLASS INCLUDE 'style1.map' END END style1.map: STYLE COLOR 0 0 0 WIDTH 1 END Ideally you'd be able to extend a base style which is what the RFC proposes. You can also do that with the INCLUDEs if you store just the style properties but not the block, eg.: CLASS STYLE INCLUDE 'style1.map' COLOR 255 0 0 # override color END END and style1.map contains: COLOR 0 0 0 WIDTH 1 Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Clément MONIER Sent: Friday, August 20, 2010 6:49 AM To: 'mapserver-users@lists.osgeo.org' Subject: [mapserver-users] refactoring STYLEs ? Hi, Is it possible to add a style definition (inside a mapfile or elsewhere ) so that it wouldn't be necessary to repeat it for each layer ? For instance : 2 layers with the same display style LAYER NAME layer1 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END LAYER NAME layer2 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END ==> STYLE 'style1' STYLE COLOR 0 0 0 WIDTH 1 END END LAYER NAME layer1 CLASS STYLE 'Style 1' END END END LAYER NAME layer2 CLASS STYLE 'Style 1' END END END Thanks & Regards Clement ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: refactoring STYLEs ?
There's a draft RFC floating around to support this but it hasn't gotten much love... You can use INCLUDEs to do something similar: Main mapfile: LAYER NAME layer1 CLASS INCLUDE 'style1.map' END END LAYER NAME layer2 CLASS INCLUDE 'style1.map' END END style1.map: STYLE COLOR 0 0 0 WIDTH 1 END Ideally you'd be able to extend a base style which is what the RFC proposes. You can also do that with the INCLUDEs if you store just the style properties but not the block, eg.: CLASS STYLE INCLUDE 'style1.map' COLOR 255 0 0 # override color END END and style1.map contains: COLOR 0 0 0 WIDTH 1 Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Clément MONIER Sent: Friday, August 20, 2010 6:49 AM To: 'mapserver-users@lists.osgeo.org' Subject: [mapserver-users] refactoring STYLEs ? Hi, Is it possible to add a style definition (inside a mapfile or elsewhere ) so that it wouldn't be necessary to repeat it for each layer ? For instance : 2 layers with the same display style LAYER NAME layer1 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END LAYER NAME layer2 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END ==> STYLE 'style1' STYLE COLOR 0 0 0 WIDTH 1 END END LAYER NAME layer1 CLASS STYLE 'Style 1' END END END LAYER NAME layer2 CLASS STYLE 'Style 1' END END END Thanks & Regards Clement ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] maps all look squished
Hi, I have never used any MabObj things, only shp2img, Mapserver CGI and WMS clients. However, I guess that your system is taking the EXTENTS from your mapfile as well as SIZE. If you change the output projection without changing extents you will see nothing because the view window is no more in the same place as the data are. And SIZE parameters can squeese your image, play with them and see. -Jukka- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 17:24 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] maps all look squished The projection in the mapfile is "init=epsg:2023". This is the same projection between /MAP/,/END/ as it is for all the projections between /LAYER/,/END/. When the projection of a layer is not the same as the projection of the map, the layer does not print. It seems redundant to have to write the same projection everywhere. I request the map image with:ms_newMapObj($PM_MAP_FILE); --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 8:04 AM Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: maps all look squished
I have 8 shapefiles, only the states shapefiles returns a projection from ogrinfo. It returns: GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]] It fails if I paste that directly into my mapfile, changing the projection to NAD83 michigan, "EPSG 2252", makes no noticeable difference, a screen shot of the map lines up exactly with the squished maps from before. --- On Fri, 8/20/10, Sumit Sharma wrote: From: Sumit Sharma Subject: [mapserver-users] Re: maps all look squished To: mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 10:46 AM it could be projection problem. Have you tried ogrinfo on your dataset? it will give you correct projection and extents of layer. For debugging purposes just try to draw one layer with whatever information you get from ogrinfo. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/maps-all-look-squished-tp5444218p5444766.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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: maps all look squished
it could be projection problem. Have you tried ogrinfo on your dataset? it will give you correct projection and extents of layer. For debugging purposes just try to draw one layer with whatever information you get from ogrinfo. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/maps-all-look-squished-tp5444218p5444766.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] maps all look squished
The projection in the mapfile is "init=epsg:2023". This is the same projection between /MAP/,/END/ as it is for all the projections between /LAYER/,/END/. When the projection of a layer is not the same as the projection of the map, the layer does not print. It seems redundant to have to write the same projection everywhere. I request the map image with:ms_newMapObj($PM_MAP_FILE); --- On Fri, 8/20/10, Rahkonen Jukka wrote: From: Rahkonen Jukka Subject: Re: [mapserver-users] maps all look squished To: "Josh Jordan" , mapserver-users@lists.osgeo.org Date: Friday, August 20, 2010, 8:04 AM Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] shp/dbf file's name
> How would MapServer know which row in your external dbf file matches which > row (aka feature) in your ShapeFile? > What if the external dbf file doesn't have the same number of rows as the > number of features in your ShapeFile? not really a problem as I'm able to generate dbf files with records in exactly same number and order as inside shp. > The dbf format is pretty primitive. Your best bet is to actually add to your > ShapeFile the data that is now in your external file. > It will also likely > be faster. That's precisely what I can't do any more, since I'd like to join various kinds of time-related attributes on very static geometries. -Message d'origine- De : P Kishor [mailto:punk.k...@gmail.com] Envoyé : vendredi 20 août 2010 15:42 À : Clément MONIER Cc : mapserver-users@lists.osgeo.org Objet : Re: [mapserver-users] shp/dbf file's name On Fri, Aug 20, 2010 at 8:22 AM, Clément MONIER wrote: > Hi, > > > > I would like to know if it's possible to draw geometries from a shp file > > according to attributes from a dbf > > but with 2 files named differently. > > > > For instance : > > > > LAYER > > NAME layer1 > > DATA shapefile1.shp > > CLASS > > EXPRESSION ([col1]=1) > > STYLE > > END > > END > > END > > > > Where col1 is a field inside a file storing attributes (dbf/csv/txt/.) but > not named shapefile1.dbf > How would MapServer know which row in your external dbf file matches which row (aka feature) in your ShapeFile? What if the external dbf file doesn't have the same number of rows as the number of features in your ShapeFile? The dbf format is pretty primitive. Your best bet is to actually add to your ShapeFile the data that is now in your external file. It will also likely be faster. > > > I already tried to use the JOIN option but I think it's inappropriate for my > purpose > > since "You cannot use joins to affect the look of a map" > (http://mapserver.org/mapfile/join.html) > > > > Thanks for your help ! > > > > Clément > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] shp/dbf file's name
On Fri, Aug 20, 2010 at 8:22 AM, Clément MONIER wrote: > Hi, > > > > I would like to know if it’s possible to draw geometries from a shp file > > according to attributes from a dbf > > but with 2 files named differently. > > > > For instance : > > > > LAYER > > NAME layer1 > > DATA shapefile1.shp > > CLASS > > EXPRESSION ([col1]=1) > > STYLE > > END > > END > > END > > > > Where col1 is a field inside a file storing attributes (dbf/csv/txt/…) but > not named shapefile1.dbf > How would MapServer know which row in your external dbf file matches which row (aka feature) in your ShapeFile? What if the external dbf file doesn't have the same number of rows as the number of features in your ShapeFile? The dbf format is pretty primitive. Your best bet is to actually add to your ShapeFile the data that is now in your external file. It will also likely be faster. > > > I already tried to use the JOIN option but I think it’s inappropriate for my > purpose > > since “You cannot use joins to affect the look of a map” > (http://mapserver.org/mapfile/join.html) > > > > Thanks for your help ! > > > > Clément > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] shp/dbf file's name
Hi, I would like to know if it's possible to draw geometries from a shp file according to attributes from a dbf but with 2 files named differently. For instance : LAYER NAME layer1 DATA shapefile1.shp CLASS EXPRESSION ([col1]=1) STYLE END END END Where col1 is a field inside a file storing attributes (dbf/csv/txt/...) but not named shapefile1.dbf I already tried to use the JOIN option but I think it's inappropriate for my purpose since "You cannot use joins to affect the look of a map" (http://mapserver.org/mapfile/join.html) Thanks for your help ! Clément ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver tile generation - google maps
I was using AGG for the rendering. I suppose I need to look for updates for that? ;). On 20 August 2010 14:08, Wim Vanbelle wrote: > I'll try updating GD. Thanks. > > TileCache is probably not an option, as the color of the data changes every > minute. That would mean that tilecache has to reset its data every minute. > Not sure if that is possible, or rather, wanted behaviour. > > OpenLayers would have been a good option, but for some odd reason the > client wants the 'real google maps' interface :). > > In any case, thanks for your help. > > > On 20 August 2010 13:48, wrote: > >> >> On Aug 20, 2010, at 7:26 AM, ext Wim Vanbelle wrote: >> >> > Hi all, >> > >> > I noticed a similar post regarding symbol issues, but there was no >> solution. >> > My Google maps tiles are currently clipped at the tile itself. This >> results in rather unwanted behaviour: >> > >> > http://fileshare.myroute.be/exchange/Capture.PNG >> >> I think the answer to this is "Use a more recent GD." If that's not >> an option, then you'll need to expand the frame of the selected image >> to be slightly larger than the actual image itself; this is possible >> with TileCache (metaBuffer), OpenLayers (gutter), etc. >> >> -- Chris >> >> > I'm not 100% sure that this is mapservers' 'issue' , or google maps >> issue. >> > >> > If anyone would have further tips to spice up the graphics even more, >> I'd be more than glad to hear them :). >> > >> > Thanks. >> > Wim >> > >> >> > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver tile generation - google maps
On Aug 20, 2010, at 7:26 AM, ext Wim Vanbelle wrote: > Hi all, > > I noticed a similar post regarding symbol issues, but there was no solution. > My Google maps tiles are currently clipped at the tile itself. This results > in rather unwanted behaviour: > > http://fileshare.myroute.be/exchange/Capture.PNG I think the answer to this is "Use a more recent GD." If that's not an option, then you'll need to expand the frame of the selected image to be slightly larger than the actual image itself; this is possible with TileCache (metaBuffer), OpenLayers (gutter), etc. -- Chris > I'm not 100% sure that this is mapservers' 'issue' , or google maps issue. > > If anyone would have further tips to spice up the graphics even more, I'd be > more than glad to hear them :). > > Thanks. > Wim > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver tile generation - google maps
I'll try updating GD. Thanks. TileCache is probably not an option, as the color of the data changes every minute. That would mean that tilecache has to reset its data every minute. Not sure if that is possible, or rather, wanted behaviour. OpenLayers would have been a good option, but for some odd reason the client wants the 'real google maps' interface :). In any case, thanks for your help. On 20 August 2010 13:48, wrote: > > On Aug 20, 2010, at 7:26 AM, ext Wim Vanbelle wrote: > > > Hi all, > > > > I noticed a similar post regarding symbol issues, but there was no > solution. > > My Google maps tiles are currently clipped at the tile itself. This > results in rather unwanted behaviour: > > > > http://fileshare.myroute.be/exchange/Capture.PNG > > I think the answer to this is "Use a more recent GD." If that's not > an option, then you'll need to expand the frame of the selected image > to be slightly larger than the actual image itself; this is possible > with TileCache (metaBuffer), OpenLayers (gutter), etc. > > -- Chris > > > I'm not 100% sure that this is mapservers' 'issue' , or google maps > issue. > > > > If anyone would have further tips to spice up the graphics even more, I'd > be more than glad to hear them :). > > > > Thanks. > > Wim > > > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] maps all look squished
Hi, What is the projection of your layer data, what is the projection for the output, and how do you request the image from Mapserver? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Josh Jordan Lähetetty: pe 20.8.2010 6:16 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] maps all look squished No matter what projection I use, my maps always look stretched too wide, or squished. What could be the problem? What can I do? Attached is a picture of the problem, the top michigan is correct, the bottom one is generated in mapserver. Can anyone from Michigan suggest a projection where the state looks the most correct? Thanks. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] refactoring STYLEs ?
Hi, You can use INCLUDE everywhere in your mapfile for reading definitions from a text file. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Clément MONIER Lähetetty: pe 20.8.2010 14:48 Vastaanottaja: 'mapserver-users@lists.osgeo.org' Aihe: [mapserver-users] refactoring STYLEs ? Hi, Is it possible to add a style definition (inside a mapfile or elsewhere ) so that it wouldn't be necessary to repeat it for each layer ? For instance : 2 layers with the same display style LAYER NAME layer1 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END LAYER NAME layer2 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END ==> STYLE 'style1' STYLE COLOR 0 0 0 WIDTH 1 END END LAYER NAME layer1 CLASS STYLE 'Style 1' END END END LAYER NAME layer2 CLASS STYLE 'Style 1' END END END Thanks & Regards Clement ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] refactoring STYLEs ?
Hi, Is it possible to add a style definition (inside a mapfile or elsewhere ) so that it wouldn't be necessary to repeat it for each layer ? For instance : 2 layers with the same display style LAYER NAME layer1 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END LAYER NAME layer2 CLASS STYLE COLOR 0 0 0 WIDTH 1 END END END ==> STYLE 'style1' STYLE COLOR 0 0 0 WIDTH 1 END END LAYER NAME layer1 CLASS STYLE 'Style 1' END END END LAYER NAME layer2 CLASS STYLE 'Style 1' END END END Thanks & Regards Clement ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver tile generation - google maps
Hi all, I noticed a similar post regarding symbol issues, but there was no solution. My Google maps tiles are currently clipped at the tile itself. This results in rather unwanted behaviour: http://fileshare.myroute.be/exchange/Capture.PNG I'm not 100% sure that this is mapservers' 'issue' , or google maps issue. If anyone would have further tips to spice up the graphics even more, I'd be more than glad to hear them :). Thanks. Wim ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users