Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some of my data has this position lon: 181 / lat: 91 So when I try to draw them on the Google map:

var geographic = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection("EPSG:3857");

var wfsProtocol = new OpenLayers.Protocol.WFS.v1_1_0({ 

               url: GeoServerURL,                  
               featureType: "Vector_Layer", 
       featureNS: "", 
       srsName: "EPSG:3857", 
               version: "1.1.0", 
               extractAttributes: true, 
               isBaseLayer: false, 
               visibility: true 
    filter: filter,                      
    callback: processTheQuery, 
    scope: [new OpenLayers.Strategy.BBOX({ 
                   ratio: 1 

Layer = new OpenLayers.Layer.Vector("test", { 
maxExtent: new OpenLayers.Bounds(-180, -85, 180, 85).transform(geographic,mercator),
displayOutsideMaxExtent: true, 
displayInLayerSwitcher: false 

function processTheQuery(request) {  
if ( && {
var b =;   
sExt = new OpenLayers.Bounds(b[0],b[1],b[2],b[3]); 

I got this error:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
  xsi:schemaLocation=" http://myDomain/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
  xmlns:xsi="" xmlns:ows="">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>java.lang.IllegalStateException: A transformation exception occurred while reprojecting data on the fly
A transformation exception occurred while reprojecting data on the fly
Latitude 91°00.0'N is too close to a pole.</ows:ExceptionText>
share|improve this question

closed as too localized by Devdatta Tengshe, whuber Feb 11 '13 at 18:21

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

While seems to be a "valid" code, your transformation exceeds the legal range (91°N does not exist...). Perhaps this posting is useful?… – markusN Feb 10 '13 at 9:36
As I understood, EPSG:3857 is the new Google projection instead of EPSG:900913. Unfortunately, nothing changed. – Shadin Feb 10 '13 at 10:42
up vote 1 down vote accepted

Maybe you didnot understand markusN's Comment, but there is a problem in your data. You have mentioned that some of your data points have latitude as 91N and Longitude as 181.

This is an incorrect position as no such position exists on the earth. The range for Latitude is from +90 to -90 and the range of Longitude is from +180 to -180.

The coordinates of your points fall outside both these ranges. This is why your layer cannot be projected to Web Mercator.

If you check and correct your data, the problem should go away.

share|improve this answer
I received these data from its source and I cannot do anything to check if it's correct. The only thing I thought about is finding a way to convert or reproject it but after your reply I understood that there is nothing I can do to fix it. right? – Shadin Feb 10 '13 at 16:25
@Shadin: Yes. Till you correct these points or delete them, you will continue to get these errors. Garbage in, Garbage out, as they say. – Devdatta Tengshe Feb 10 '13 at 16:42
Thank you for saving my time – Shadin Feb 10 '13 at 16:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.