[mapserver-users] Feature_ID
Jim Burnett
jimburnett at ntelos.net
Wed Aug 22 12:43:41 PDT 2001
OK I think I get it.
So I should add an "ID" field to the shape file.
It makes sense, because I am not querying anything on this shape file ( river and contouer lines), so thats why there isnt any fields.
Also,
I can get a refresnce map to show up in JPG and PNG, but it looks like it is always in full extent. Once in a while it will move, but not much at all.
Here is my code:
****start
require 'config.php';
$dfMinX = $CUREXTENT[minx];
$dfMinY = $CUREXTENT[miny];
$dfMaxX = $CUREXTENT[maxx];
$dfMaxY = $CUREXTENT[maxy];
$mapObj = ms_newMapObj("$dataPath/" . $map . ".map");
$mapObj->setExtent($CUREXTENT[minx],$CUREXTENT[miny],$CUREXTENT[maxx],$CUREXTENT[maxy]);
$nClickGeoX = GMapPix2Geo(intval($map_x), 0, $width, $dfMinX, $dfMaxX, 0);
$nClickGeoY = GMapPix2Geo(intval($map_y), 0, $height, $dfMinY, $dfMaxY, 1);
$ptClicked = ms_newPointObj();
$ptClicked->setXY($nClickGeoX, $nClickGeoY);
# $queryObj = $mapObj->queryByPoint( $ptClicked,MS_SINGLE,0 );
# $gbShowQueryResults = TRUE;
#print" $map $map_x $map_y $dataPath \n";
$img = $mapObj->drawReferenceMap();
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("content-type: image/png");
$img->saveImage("",MS_PNG,0,0, 100);
********end
thanks
-jim
----- Original Message -----
From: "Stephen Lime" <steve.lime at dnr.state.mn.us>
To: <jimburnett at ntelos.net>
Sent: Tuesday, August 21, 2001 1:55 PM
Subject: Re: [mapserver-users] Feature_ID
No, there is a single classitem for a given layer. That is, you can pick a single
item to compare expressions against. That works for straight string comparisons
and regular expressions. You can also use logical expressions that operate on
many items although there is a performance hit for doing so.
Feature_id may be a virtual ID, one maintained by the application rather than
something actually in the shapefile. By their very nature each shape in a shapefile
has an sequential index number (shape 0, shape 1 and so on) so that may be
whay you're refering to. At the moment MapServer doesn't allow you to use that
value in an expression.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> "Jim Burnett" <jimburnett at ntelos.net> 08/20/01 01:24PM >>>
so there are diferent types of "class items" ?
I was just looking for an item to use, based on ArcExplorers output.
feature_id seems to be in all the shape files I have been working with, but
wont work, I have had to use other id's such as "road_id" for my roads
shape file and "building_id" for my building ID. But this doesnt have a
"river_id", or a custom ID besides the feature_id and some other id
fields...
I am still new to GIS, been doing it for about 3 months now.
-jim
----- Original Message -----
From: "Stephen Lime" <steve.lime at dnr.state.mn.us>
To: <mapserver-users at lists.gis.umn.edu>; <jimburnett at ntelos.net>
Sent: Monday, August 20, 2001 12:12 PM
Subject: Re: [mapserver-users] Feature_ID
> What version, datatype etc? Assuming there is an item called feature_id
there's no reason it
> shouldn't work. That said being able to use a psuedo id in classes is not
a bad idea. That id
> is already a part of the internal shape structures but it's not trivial to
add that to the expression
> handler. Would you add this as a feature request to Bugzilla?
>
> Steve
>
> Stephen Lime
> Internet Applications Analyst
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> "Jim Burnett" <jimburnett at ntelos.net> 08/17/01 12:55PM >>>
> Why can't I use Feature_ID as a CLASSITEM?
> I have a line layer, which has other attribute data, but no matter which
of the fields I use, none work. Why cant I just use the standard FeatureID.
its just for display only.
>
>
> -jim
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010822/46f667e4/attachment.htm>
More information about the MapServer-users
mailing list