Frustration setting in.. Plotting a single point...
Ed McNierney
ed at TOPOZONE.COM
Sat Feb 5 06:57:04 PST 2005
Jeff -
You might be able to (temporarily) reduce the number of variables in
your problem by having your temp point layer use the default output
projection of the map. You'll need to change the point coordinates to
be in the middle of the projected EXTENT.
Check colors, too, to make sure you're not drawing white on white....
- Ed
Ed McNierney
TopoZone.com
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Jeff Cotterman
Sent: Saturday, February 05, 2005 12:51 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Frustration setting in.. Plotting a
single point...
Thanks Ed,
I switched the two and you should have seen my glee when the png file
size increased by 8 bytes, just enough for a small point, but alas still
no point.
However the EXTENT line I got from someone else, so I never questioned
that part, and when I tried running ogrinfo on the shape files, the
server doesn't have a full GDAL install, so I'm gonna nab the shapefiles
and get GDAL up on my machine here...
So I'm not going to trust the EXTENTs and try to figure them out, thats
the one part I haven't changed...
I even tried setting the point to be dead middle of the range, and still
no point..
But I least I have something new to try!
Thanks!
Jeff
Ed McNierney wrote:
>Jeff -
>
>Sorry if I'm tuning in late, but I'm not exactly sure what the symptom
>you're seeing is.
>
>However, your EXTENT:
>
>EXTENT -2526068.80 3808293.58 2601312.92 930341.78
>
>Is wrong, as it needs to be minX, minY, maxX, maxY and your minY is
>larger than your maxY.
>
>There's nothing especially huge about those extents, and I don't see
why
>there should be a problem with them, if you put them in the right
order.
>
> - Ed
>
>Ed McNierney
>TopoZone.com
>
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
>Behalf Of Jeff Cotterman
>Sent: Friday, February 04, 2005 8:41 PM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: [UMN_MAPSERVER-USERS] Frustration setting in.. Plotting a
>single point...
>
>I'm sure this is something very simple, and I have gone through the
>archives, and have copied numerous examples, the only thing I think can
>be
>causing a problem is the huge extents of my shape file, and the point
>not
>being converted correctly? There are two shapefiles for the US, and
>state
>borders..
>
>Anyway, here is my php file (which should look almost identical to the
>many
>examples given) and my map file, any pointers would be greatly
>appreciated.
> I have tried it with and without the setProjection also..
>
><?php
>
>//Load the dynamic library.
>dl('php_mapscript.so');
>
>// create our map object
>$map_file = "basic.map";
>$map = ms_newMapObj($map_file);
>
>// create a temp layer to hold our points
>$point_layer = ms_newLayerObj($map);
>$point_layer->set("name", "markers");
>$point_layer->set("type", MS_LAYER_POINT);
>$point_layer->set("status", MS_DEFAULT);
>$point_layer->setProjection("proj=latlong",MS_TRUE);
>
>// create a class and style for this layer
>$point_class = ms_newClassObj($point_layer);
>$point_style = ms_newStyleObj($point_class);
>$point_symbol = $map->getSymbolByName("point");
>$point_style->set("symbol", $point_symbol);
>$point_style->set("size", 20);
>
>// draw our image without the points
>$image = $map->draw();
>
>// initialize our point and add it to the map
>$point = ms_newPointObj();
>$longitude="-149.0300";
>$latitude="61.5600";
>$point->setXY($longitude, $latitude);
>$point->draw($map, $point_layer, $image, 0, "");
>
>// get the location for our new image
>$tmp_png_file = $image->saveWebImage (MS_PNG, 0, 0, 0);
>exec ("mv ".$tmp_png_file." "."/home/cotterj/test.png");
>?>
>
>--------------------------------------------
>MAP
> DEBUG on
> EXTENT -2526068.80 3808293.58 2601312.92 930341.78
> SIZE 410 240
> SHAPEPATH /home/cotterj/shp/
> IMAGECOLOR 255 255 255
> PROJECTION
> "proj=lcc"
> "lat_0=18"
> "lat_1=18"
> "lon_0=-93"
> "k_0=1"
> "x_0=350000"
> "y_0=150000"
> "ellps=GRS80"
> END
>
> WEB
> IMAGEPATH /home/cotterj/map
> IMAGEURL /home/cotterj/map
> END
>
> LAYER
> NAME "usa"
> DATA county
> STATUS DEFAULT
> TYPE POLYGON
> PROJECTION
> "init=epsg:4269"
> END
> CLASS
> NAME "base conus"
> COLOR 255 255 255
> END
> END
> LAYER
> NAME "State Outlines"
> DATA state
> STATUS DEFAULT
> TYPE POLYGON
> PROJECTION
> "init=epsg:4269"
> END
> CLASS
> NAME "usa"
> OUTLINECOLOR 102 102 102
> END
> END
>END # end of map file
>
>---------------------------------------------
>
>Once again any help or things to try would be appreciated! I think I
>have
>tried ever incarnation in the archives!
>
>Cheers,
>Jeff
>
>
>
>
More information about the MapServer-users
mailing list