Hi Steven,

I would like to use 41001 all the way, but my data is stored in PostGis in
degrees.
I've already tried to setup GeoServer to serve the data in 41001 by using
the "Reproject from native to declared SRS" option. Still, for a WFS
GetFeature request, GeoServer wants the bounding box in degrees (probably
because the data is stored in PostGIS that way.)

I could reproject the data in PostGIS and store it in meters, but that is
not possible for other reasons.

So I need to convert from meters to degrees somewhere along the way, and
GeoServer does not seem to be doing it for me! 

I guess I will have to do a conversion in the WFSGetFeature.js widget. I
wrote one for the old widget, but the problem is that the proj.js file has
been changed (reduced) with the OpenLayers integration, and I need some of
the conversion routines in that file:


containerProj = new Proj(objRef.targetModel.containerModel.getSRS());
point_in_degrees = containerProj.Inverse(point);

How can I rewrite this code to have it work after the openlayers
integration?

Best regards,




Lex Tiekink

-----Original Message-----
From: Steven M. Ottens [mailto:[EMAIL PROTECTED] 
Sent: woensdag 19 september 2007 11:26
To: Lex Tiekink
Cc: [email protected]
Subject: Re: [Mapbuilder-users] Map projections and WFSGetFeature

Hi Lex,

Why do you not configure Geoserver to serve in 41001? Also if you get 
the data in 4326, how do you reproject it to show as 41001?
If you want to reproject your WFSrequest, you will probably need to 
rewrite a bit of the code to use proj4js to reproject to deegrees. It 
should be able to do so, but it's not a standard function of mapbuilder. 
I recommend to use 41001 all the way, from Geoserver all the way to 
Mapbuilder and back. But if that's not an option, I might be able to 
assist you to adept the WFS request to reproject on the fly.

Steven

Lex Tiekink wrote:
> Hi everybody,
>
>
> I'm building a web application using mapbuilder and geoserver. I'm using
1.5
> alpha2 and Geoserver 1.5.3.
>
> I have a problem with projections. My data is in geoserver and is served
in
> 4326, in degrees.
> I would like to display the maps in 41001 (mercator), therefore in the xml
> file I have specified a bounding box in 41001, in meters.
> The map displays in the correct projection. So far, so good.
>
> Now when I try to do a WFSGetFeature, the coordinates on the map are
> calculated in meters (because of the 41001 projection). When I look at the
> URL for the WFSGetFeature, the coordinates are also in meters, and
GeoServer
> doesn't seem to like this. It expects the coordinates to be in degrees.
> Therefore, none of my requests return a result.
>
> How do I solve this issue? How can I tell mapbuilder to convert the meters
> to degrees?
>
> With kind regards, 
>
>  
>
>  
>
>  
>
>  
>
> Lex Tiekink
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Mapbuilder-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
>   





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to