[gradsusr] Crop country boundary or masking an area - still not working

Huddleston, John Huddleston at cira.colostate.edu
Fri Sep 9 16:09:29 EDT 2011


Serge

Attached is your study area shapefile (Study_Area.shp). Use ogr2ogr to clip your data.

You can get ogr2ogr from http://www.gdal.org/ogr2ogr.html or if on Linux use 'apt-get install gdal-bin'.

Use the following command:

ogr2ogr -clipsrc Study_Area.shp output.shp Your_input_data.shp

where Study_Area.shp is a shapefile in the attached zip file and Your_input_data.shp is the shapefile you want to clip.

John Huddleston, PhD
Cooperative Institute for Research in the Atmosphere



From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Rafanoharana Serge Claudio
Sent: Friday, September 09, 2011 12:59 PM
To: GrADS Users Forum
Subject: [gradsusr] Crop country boundary or masking an area - still not working

Dear all,

I've already posted this message before but I can't get it worked.
If any of you have any idea to crop the study area, please let me know. One said that it is possible to grab a shapefile of the top part  and fill it with black (I guess he meant re-setting the value of the variable covered by this shapefile to 0). If you have any experience or any tips on how to do that, thanks in advance for your help.

Kind regards,

Serge
---------- Forwarded message ----------
From: Rafanoharana Serge Claudio <rafanoharana at gmail.com<mailto:rafanoharana at gmail.com>>
Date: Fri, Aug 26, 2011 at 7:53 AM
Subject: Crop country boundary
To: GrADS Users Forum <gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>>


Dear all,

I would like to ask if there is a way to crop the data to a specific area.
In GrADS, if we use 'set mpdset hires', we have the country boundary. However for my case I only need the study area (please refer to the attached file).

I found that http://www.diva-gis.org/datadown provides Grid data. Can we use the data from this Website to crop it or...?

Thank you,

--
Serge



--
Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110909/5f24b32d/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Study_Area.zip
Type: application/x-zip-compressed
Size: 2202193 bytes
Desc: Study_Area.zip
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110909/5f24b32d/attachment-0003.bin 


More information about the gradsusr mailing list