[mapserver-commits] r7249 - in branches/branch-5-0/mapserver: .
mapscript/csharp/examples mapscript/doc mapscript/swiginc
svn at osgeo.org
svn at osgeo.org
Mon Jan 7 10:43:27 EST 2008
Author: tamas
Date: 2008-01-07 10:43:27 -0500 (Mon, 07 Jan 2008)
New Revision: 7249
Modified:
branches/branch-5-0/mapserver/HISTORY.TXT
branches/branch-5-0/mapserver/mapobject.c
branches/branch-5-0/mapserver/mapscript/csharp/examples/drawquery.cs
branches/branch-5-0/mapserver/mapscript/doc/mapscript.txt
branches/branch-5-0/mapserver/mapscript/swiginc/map.i
branches/branch-5-0/mapserver/mapscript/swiginc/rect.i
branches/branch-5-0/mapserver/mapserver.h
Log:
Reverting r7245
Modified: branches/branch-5-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-0/mapserver/HISTORY.TXT 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/HISTORY.TXT 2008-01-07 15:43:27 UTC (rev 7249)
@@ -12,9 +12,6 @@
Current Version (SVN branch-5-0)
--------------------------------
-- Implement mapObj.setCenter, mapObj.offsetExtent, mapObj.scaleExtent,
- rectObj.getCenter at the SWIG API (#2346)
-
- SLD using a single BBOX filter should generate an SQL ststement for
oracle/postgis/ogr (#2450)
Modified: branches/branch-5-0/mapserver/mapobject.c
===================================================================
--- branches/branch-5-0/mapserver/mapobject.c 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapobject.c 2008-01-07 15:43:27 UTC (rev 7249)
@@ -256,65 +256,6 @@
}
/************************************************************************/
-/* msMapOffsetExtent() */
-/************************************************************************/
-
-int msMapOffsetExtent( mapObj *map, double x, double y)
-{
- return msMapSetExtent( map,
- map->extent.minx + x, map->extent.miny + y,
- map->extent.maxx + x, map->extent.maxy + y);
-}
-
-/************************************************************************/
-/* msMapScaleExtent() */
-/************************************************************************/
-
-int msMapScaleExtent( mapObj *map, double zoomfactor,
- double minscaledenom, double maxscaledenom)
-{
- double geo_width, geo_height, center_x, center_y, md;
-
- if (zoomfactor <= 0.0) {
- msSetError(MS_MISCERR, "The given zoomfactor is invalid", "msMapScaleExtent()");
- }
-
- geo_width = map->extent.maxx - map->extent.minx;
- geo_height = map->extent.maxy - map->extent.miny;
-
- center_x = map->extent.minx + geo_width * 0.5;
- center_y = map->extent.miny + geo_height * 0.5;
-
- geo_width *= zoomfactor;
-
- if (minscaledenom > 0 || maxscaledenom > 0) {
- /* ensure we are within the valid scale domain */
- md = (map->width-1)/(map->resolution * msInchesPerUnit(map->units, center_y));
- if (minscaledenom > 0 && geo_width < minscaledenom * md)
- geo_width = minscaledenom * md;
- if (maxscaledenom > 0 && geo_width > maxscaledenom * md)
- geo_width = maxscaledenom * md;
- }
-
- geo_width *= 0.5;
- geo_height = geo_width * map->height / map->width;
-
- return msMapSetExtent( map,
- center_x - geo_width, center_y - geo_height,
- center_x + geo_width, center_y + geo_height);
-}
-
-/************************************************************************/
-/* msMapSetCenter() */
-/************************************************************************/
-
-int msMapSetCenter( mapObj *map, pointObj *center)
-{
- return msMapOffsetExtent(map, center->x - (map->extent.minx + map->extent.maxx) * 0.5,
- center->y - (map->extent.miny + map->extent.maxy) * 0.5);
-}
-
-/************************************************************************/
/* msMapSetRotation() */
/************************************************************************/
Modified: branches/branch-5-0/mapserver/mapscript/csharp/examples/drawquery.cs
===================================================================
--- branches/branch-5-0/mapserver/mapscript/csharp/examples/drawquery.cs 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapscript/csharp/examples/drawquery.cs 2008-01-07 15:43:27 UTC (rev 7249)
@@ -98,7 +98,6 @@
if (zoomToResults)
{
map.setExtent(query_bounds.minx, query_bounds.miny, query_bounds.maxx, query_bounds.maxy);
- map.scaleExtent(1.2, 0, 0); // increasing the visible area
Console.WriteLine("Current map scale: 1:" + (int)map.scaledenom);
}
}
Modified: branches/branch-5-0/mapserver/mapscript/doc/mapscript.txt
===================================================================
--- branches/branch-5-0/mapserver/mapscript/doc/mapscript.txt 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapscript/doc/mapscript.txt 2008-01-07 15:43:27 UTC (rev 7249)
@@ -2116,21 +2116,6 @@
setExtent( float minx, float miny, float miny, float maxy ) : int
Set the map extent, returns MS_SUCCESS or MS_FAILURE.
-offsetExtent( float x, float y) : int
- Offset the map extent based on the given distances in map coordinates,
- returns MS_SUCCESS or MS_FAILURE.
-
-scaleExtent( float zoomfactor, float minscaledenom, float maxscaledenom) : int
- Scale the map extent using the zoomfactor and ensure the extent
- within the minscaledenom and maxscaledenom domain.
- If minscaledenom and/or maxscaledenom is 0 then the parameter is
- not taken into account.
- returns MS_SUCCESS or MS_FAILURE.
-
-setCenter( pointObj_ center ) : int
- Set the map center to the given map point,
- returns MS_SUCCESS or MS_FAILURE.
-
setFontSet( string filename ) : int
Load fonts defined in *filename* into map fontset. The existing
fontset is cleared. Returns MS_SUCCESS or MS_FAILURE.
Modified: branches/branch-5-0/mapserver/mapscript/swiginc/map.i
===================================================================
--- branches/branch-5-0/mapserver/mapscript/swiginc/map.i 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapscript/swiginc/map.i 2008-01-07 15:43:27 UTC (rev 7249)
@@ -80,19 +80,6 @@
return msMapSetExtent( self, minx, miny, maxx, maxy );
}
- int offsetExtent(double x, double y) {
- return msMapOffsetExtent( self, x, y );
- }
-
- int scaleExtent(double zoomfactor,
- double minscaledenom, double maxscaledenom) {
- return msMapScaleExtent( self, zoomfactor, minscaledenom, maxscaledenom );
- }
-
- int setCenter(pointObj *center) {
- return msMapSetCenter( self, center );
- }
-
/* recent rotation work makes setSize the only reliable
method for changing the image size. direct access is deprecated. */
int setSize(int width, int height)
Modified: branches/branch-5-0/mapserver/mapscript/swiginc/rect.i
===================================================================
--- branches/branch-5-0/mapserver/mapscript/swiginc/rect.i 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapscript/swiginc/rect.i 2008-01-07 15:43:27 UTC (rev 7249)
@@ -70,21 +70,6 @@
return MS_SUCCESS;
}
- %newobject getCenter;
- pointObj *getCenter()
- {
- pointObj *center;
- center = (pointObj *)calloc(1, sizeof(pointObj));
- if (!center) {
- msSetError(2, "Failed to allocate memory for point", "getCenter()");
- return NULL;
- }
- center->x = (self->minx + self->maxx)/2;
- center->y = (self->miny + self->maxy)/2;
-
- return center;
- }
-
%newobject toPolygon;
shapeObj *toPolygon()
{
Modified: branches/branch-5-0/mapserver/mapserver.h
===================================================================
--- branches/branch-5-0/mapserver/mapserver.h 2008-01-05 16:29:43 UTC (rev 7248)
+++ branches/branch-5-0/mapserver/mapserver.h 2008-01-07 15:43:27 UTC (rev 7249)
@@ -1355,10 +1355,6 @@
MS_DLL_EXPORT int msMapSetExtent(mapObj *map, double minx, double miny,
double maxx, double maxy);
-MS_DLL_EXPORT int msMapOffsetExtent( mapObj *map, double x, double y);
-MS_DLL_EXPORT int msMapScaleExtent( mapObj *map, double zoomfactor,
- double minscaledenom, double maxscaledenom);
-MS_DLL_EXPORT int msMapSetCenter( mapObj *map, pointObj *center);
MS_DLL_EXPORT int msMapSetRotation( mapObj *map, double rotation_angle );
MS_DLL_EXPORT int msMapSetSize( mapObj *map, int width, int height );
MS_DLL_EXPORT int msMapSetSize( mapObj *map, int width, int height );
More information about the mapserver-commits
mailing list