2

i just imported a vectorlayer (without any reference points) to qgis as mollweide projection to save it to longlat. What i am wondering about is a mathematical problem: Not every x,y coordinate on the screen is valid when i put it to the inverse formular for this projection. So how do i find the valid area so i can resize my vectorlayer properly?

Many thanks in advance an sorry for mistakes, im german MX117

2

There might be a mathematical solution, but I prefer to solve it using QGIS:

  1. Create a line from (179.9, 90) to (179.9, -90) using the lat/lon coordinate system
  2. Densify the line using 34 control point to get a node at every 5 degrees (or more if you like)
  3. Reproject the layer to Mollweide
  4. Do the same for -179.9 East

All points in Mollweide outside the lines have no valid lat/lon coordinates.

You could as well create a polygon from the two lines, reproject the whole to Mollweide, and crop the Mollweide layer (raster or vector) to that:

  1. Create a text file with the following content
Nr;WKT
1;POLYGON ((179.9 90, 179.9 -90, -179.9 -90, -179.9 90, 179.9 90))
  1. Load it into QGIS as delimited text, semicolon as delimter, WGS84 or your custom latlon CRS

  2. Save it as shapefile, add it to the canvas and delete the text layer

  3. Densify the polygon with Vector -> Geometry Tools -> densify geomteries

  4. Change project CRS to your Mollweide projection

  5. Save the polygon under a new file name in that projection, and delete the latlon layer

  6. To clip a shapefile, use Vector -> Geoprocessing Tools -> Clip. Both layers must have the same CRS.

  7. To clip a raster, use Raster -> Extraction -> Clipper. Both layers must have the same CRS.

  • Thanks again. Quite simple, but i never would have thought about it. – user6193 May 8 '14 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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