[mapserver-users] Mapserver wms and Openlayers 3

2015-07-24 Thread jordan
Hope you can guide me in this issue I have. My aim is to connect to a Postgis
database from Openlayers 3 using Mapserver WMS.

Apparently all is set up in my mapfile for WMS service(postgres connection
inside). I have tested and validated the getmap request, no errors found.

Here is my URL:
http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/maquetado/mapfiles/demo3.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=agave_01_gcs,agave_02_gcsSTYLES=SRS=EPSG:4326BBOX=-103.809,20.8419,-103.716,20.8878WIDTH=105HEIGHT=22FORMAT=image/png

After that I change the path inside the http.conf file as follows:
SetEnv myMap C:/ms4w/Apache/htdocs/maquetado/mapfiles/demo3.map

Here is my final URL: http://localhost/cgi-bin/mapserv.exe?map=myMap

I have tested it in GIS clients as a QGIS and ArcGIS and all is ok but when
I try to use it in OL3 no layers are shown.

I think that probably something is wrong with my WMS url that OL3 can not
read..
So it is possible to change the mapserv.exe in my URL specifically omit
the exe ??

I need something like this: http://localhost/cgi-bin/mapserv?map=myMap

Best regards
Jordan









--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapserver-wms-and-Openlayers-3-tp5216956.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] Heatmap / choropleth from points attributes

2011-02-23 Thread Josh Jordan
First, you have to turn your points into shapes, theres some algorithm that 
will turn points into polygons with borders midway between each point.  Then, 
you have to add classes to the mapfile.  Add one class per color.  You have to 
calculate the bounds and color for each class like this:
CLASS    EXPRESSION(([POPULATION] gt 90457) AND ([POPULATION] le 108397))    
STYLE      COLOR 10 20 50    ENDEND
If your CSV data isnt joined to the mapserver data, you have to calculate what 
shapes are in each bucket like this-
CLASS    EXPRESSION(([NAME] = Shape1) OR ([NAME] = Shape2))    STYLE      
COLOR 10 20 50    ENDEND
--- On Tue, 2/22/11, Daniel Cole dan...@southernsolutionsms.com wrote:

From: Daniel Cole dan...@southernsolutionsms.com
Subject: [mapserver-users] Heatmap / choropleth from points attributes
To: mapserver-users@lists.osgeo.org
Date: Tuesday, February 22, 2011, 10:06 PM

I am a new mapserver user and have spent countless hours over the last month 
reading, trying code, etc. before posting here for help.  I am trying to 
generate an image (non-interactive) on a webpage based off of attribute data in 
a points file.  For example, 20 different points equally distributed in a field 
contain data about the moister level of the soil.  I want to make the lowest 
levels blue and the highest levels yellow, or something like that with some 
gradients in between.  If possible I want it to have interpolated data between 
them to show the gradual change, but that isn't a must.   I also want to wrap 
it in a polygon that trims the edges.  

I found some python code that I thought might do the trick , but it seems lots 
of heat maps are based off of how many points exist in a certain area, and 
thats now what I am doing.  

My points contain numbers in the attributes, 5, 25, 92, 71, etc.   I feel like 
I am missing some easy way to do this right in front of me with gdal or 
something.  If someone has any direction or even demo code that would be 
greatly appreciated.  

Thanks,

Daniel

-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] ogr connection trouble

2011-02-23 Thread Josh Jordan
I am trying to get mapserver to draw an OGR layer, was wondering what this 
means in the OGRINFO readout, I get a series of fields with String (0.0), was 
wondering what (0.0) means or if its the problem?
POPULATION: String (0.0)MALE: String (0.0)FEMALE: String (0.0)




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


RE: [mapserver-users] projecting in degrees

2010-08-24 Thread Josh Jordan
Thanks for the suggestions.  I am able to reproject my maps with mapserver.  I 
found out what projection my maps started in by reprojecting in QGIS, it filled 
in the starting projection.  Either it calculated what that projection was, or 
it was the default.  Then, wherever my site modified coordinates in the 
mapfile, I used cs2cs to convert meters to degrees first.  Alaska wraps so I 
had to change starting longitude to -40.  All works good now! 

--- On Tue, 8/24/10, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote:

From: Fawcett, David (MPCA) david.fawc...@state.mn.us
Subject: RE: [mapserver-users] projecting in degrees
To: Josh Jordan outerspacema...@yahoo.com, 
mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org
Date: Tuesday, August 24, 2010, 12:10 PM




 
 






 



My understanding of spatial reference systems(SRS) is that the
units of the utilized by the SRS are inherently part of the definition.  When
data is projected to a particular SRS, the units are set by that SRS.   

   

It sounds like you are looking for some sort of cylindrical
based  SRS  

   

Maybe Miller Cylindrical (except units are in meters)? 
http://www.colorado.edu/geography/gcraft/notes/mapproj/gif/millerc.gif 
http://spatialreference.org/ref/esri/54003/ 

   

Maybe straight unprojected lat long?  
http://www.colorado.edu/geography/gcraft/notes/mapproj/gif/unproj.gif 

   

You can possibly handle the conversion of extents on the client
side.   

   

Your annotations could be handled in ‘degrees’ by
defining input projections for your layers and an output projection for your
map.  Your annotation layer could be in geographic coords and the
annotation points would be projected by MapServer. 

   

David. 

   

   

   



From:
mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Josh
Jordan

Sent: Friday, August 20, 2010 7:20 PM

To: mapserver-users@lists.osgeo.org

Subject: [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] maps all look squished

2010-08-20 Thread Josh Jordan
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 jukka.rahko...@mmmtike.fi wrote:

From: Rahkonen Jukka jukka.rahko...@mmmtike.fi
Subject: Re: [mapserver-users] maps all look squished
To: Josh Jordan outerspacema...@yahoo.com,
 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

2010-08-20 Thread Josh Jordan
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 sumit...@hotmail.com wrote:

From: Sumit Sharma sumit...@hotmail.com
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


Re: [mapserver-users] maps all look squished

2010-08-20 Thread Josh Jordan
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 jukka.rahko...@mmmtike.fi wrote:

From: Rahkonen Jukka jukka.rahko...@mmmtike.fi
Subject: Re: [mapserver-users] maps all look squished
To: Josh Jordan outerspacema...@yahoo.com, 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 jukka.rahko...@mmmtike.fi wrote:

From: Rahkonen Jukka jukka.rahko...@mmmtike.fi
Subject: Re: [mapserver-users] maps all look squished
To: Josh Jordan outerspacema...@yahoo.com,
 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