[Geoserver-users] offset

After the GIS data is retrieved from Database, how to add offset to them before publishing map.
For example, moving all point or line to north 100 meters.
Should I modify the following code ?

final Integer startIndex = request.getStartIndex();
if (startIndex != null) {
QueryCapabilities queryCapabilities = source.getQueryCapabilities();
if (queryCapabilities.isOffsetSupported()) {
// fsource is required to support
// SortBy.NATURAL_ORDER so we don’t bother checking
definitionQuery.setStartIndex(startIndex);
} else {
// source = new PagingFeatureSource(source,
// request.getStartIndex(), limit);
throw new ServiceException("startIndex is not supported for the "

  • mapLayerInfo.getName() + " layer");
    }
    }

2010/10/22 lv <lv.123@anonymised.com>:

After the GIS data is retrieved from Database, how to add offset to them
before publishing map.
For example, moving all point or line to north 100 meters.

The first question here has to be why do you want to do that? If your
data is wrong in the database you'd be much better off fixing it there
rather than modifying the GeoServer code to "fix" it.

If however you need to modify features on the fly then you should
probably look at the WPS module which allows the server to carry out
arbitrary data operations.

Ian
--
Ian Turton

Thanks for your reply.
Could you please give more detail information about how to modify WPS module?
The reason why I need to offset maps is the client does not want to give corrent data
to the programmers who are not on client site.

Date: Fri, 22 Oct 2010 09:13:35 -0400
Subject: Re: [Geoserver-users] offset
From: ijturton@anonymised.com
To: lv.123@anonymised.com
CC: geoserver-users@lists.sourceforge.net

2010/10/22 lv lv.123@anonymised.com:

After the GIS data is retrieved from Database, how to add offset to them
before publishing map.
For example, moving all point or line to north 100 meters.

The first question here has to be why do you want to do that? If your
data is wrong in the database you’d be much better off fixing it there
rather than modifying the GeoServer code to “fix” it.

If however you need to modify features on the fly then you should
probably look at the WPS module which allows the server to carry out
arbitrary data operations.

Ian

Ian Turton