I'm looking to create a map of Afghanistan and I am in the middle of resampling binary geographic data into topojson format. The trouble is that my research of WSEN borders has returned nothing and I do not know how to adapt this section of the code to my area of interest.

For instance, in the makefile/d3.js tutorial I'm trying to learn from uses this syntax to display France:

# boxing: 
crop.tif: ETOPO1_Ice_g_geotiff.tif
    gdal_translate -projwin -005.50 051.30 10.00 041.00 ETOPO1_Ice_g_geotiff.tif crop.tif
    # ulx uly lrx lry  // W N E S // -005.50 051.30 010.00 041.00

The author must assume the users have this as background knowledge, but sadly I do not and I could not find any more information on how WSEN borders work. To me, a rectangle whose vertices are coordinate pairs would make sense, but perhaps there is a reason for using the WNES border format?

How do I compute WSEN borders for the general case and what tools do I need for the task?


You just need to find a map (paper or digital) with France and lines of longitude (X) and latitude (Y) marked on it.

Determining WSEN (West South East North) borders can be done by drawing a rectangle around France and reading the MinX (W), MinY (S), MaxX (E) and MaxY (N) values.

You may need to convert from Degrees Minutes Seconds (DMS) to Decimal Degrees (DD) but a search here or via Google will quickly provide the algorithm which is based on there being 60 seconds in a minute, and 60 minutes in a degree.

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.