Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to keep all the features in the shapefile that lie in the raster region and reject others. How do i do this?

------Adding More Details--------

Data to be Clipped: Is A Shapefile of 1 mile circles.

Data I want it clipped with : is a Raster (GeoTiff or ADF).

Now I want to find out all the Circles from shapefile that overlap on the Raster.

I dont want to modify the raster here. I want those features (circles) from the Shapefile removed which donot overlap with the raster.


Problem is I have tried the tool mentioned by Dano, but tools expects a feature input in the second field, and not a raster directly.

Thanks Shaunak

share|improve this question
    
What prevents you from simply selecting the circles to include and then saving the selection? The easy way is with the mouse. A reliable but still simple way is to select the circles based on their centers (which can be computed) and the limits of the raster. Naming those limits "R" (right), "L" (left), "T" (top), and "B" bottom, the query on a center location (X,Y) is just L-1 <= X <= R+1 and B-1 <= Y <= T+1. (Convert the "1"s into miles in the shapefile's units; e.g., 1 mile = 1609 meters, and use database-appropriate syntax for the inequalities.) –  whuber Sep 19 '11 at 19:28

4 Answers 4

up vote 1 down vote accepted

Could you use ArcToolBox > Raster > Raster Properties > Get Raster Properties

Run the tool four times, each time setting the Property Type in the tool once to get the Top, then left, then right, then bottom coordinate of the raster.

Once you have the four corner coordinates of the raster, create an empty polygon shapefile (with the same coordinate system as your raster). Edit the empty shapefile to create a new polygon using the top, left, right, and bottom coordinates (absolute xy).

Save this shapefile and then use to clip, or intersect to get the overlapping area of your input circles.

share|improve this answer
    
Thanks Lynn, Yes that seems to be a option right now, although not an ideal one. Because some circles may lie in the raster's bounding box, but not on it. –  Shaunak Sep 19 '11 at 1:32
1  
OK it sounds like you don't actually want to Clip the circles then...? Could you try this - create the bounding box, then using Selection > Select by Location to Select the circle features that intersect the bounding box. This should select all the circles the "touch" the bounding box. Once selected, right click the circles shapefile in the Data Frame and from the context menu choose Data > Export Data. This will write out the selected circles that are within and/or touch the bounding box of the raster to a new shapefile. –  Lynn Sep 19 '11 at 16:47
    
Thanks Lynn, Your answer gave me the idea, i just improvised a bit, instead of using the bounding box, i used the boundry polygon of my raster. –  Shaunak Sep 30 '11 at 7:11

I think to use arcgis you will need to create a footprint of your raster.
Similar solution to this Recent answer here.
Then follow the instructions of Dano.

share|improve this answer
    
+1 @ Brad - your first step would be quicker than creating the shapefile & digitizing the rectangle. Good point! –  Dano Sep 17 '11 at 12:04
    
Brad, In my ArcGIS 10 I dont have the "Mosaic Dataset" toolbox under Raster in Data Management :( i checked and all the extensions are enabled :( any other suggestions to get the same thing done? –  Shaunak Sep 17 '11 at 20:44
    
@Shaunak - I am sorry, I should have looked further. I see now that creating a Mosaic Dataset (MD), adding images to a MD, and recalculating footprints,. Does require editor or info license. Apparently if you had a MD with images in it you wouleld be able to build footprints with the AV license. I think short of finding an editor license, Using Dano's Idea and digitize a cookie cutter shapefile around your image, or using gdal to automate it. –  Brad Nesom Sep 18 '11 at 22:41

Digitize a cookie cutter shapefile around your raster image and use it to clip the data. The clip tool is under the geoprocessing tab in the top menus. You can also find the clip tool in ArcToolbox under Analysis Tools ------> Extract.

See image below --- the Input Features are the shapefile you want to clip by region ---- the Clip Feature will be the "cookie cutter" shapefile you digitized around your raster image. Give a name to your clipped file in the Output Feature Class field below and select a folder to save it to. If you look at the pictures to the right, it's pretty self explanitory.

enter image description here

share|improve this answer
    
@Dango: The tool you suggested uses Clip features as another feature file like for eg. a shapefile. I need the Clip feature to be my raster. This tool doesn't take raster as input for clip features. I have already tried it. Or am i getting it wrong? Thanks! –  Shaunak Sep 17 '11 at 4:00
    
My answer above/below can probably be ignored - @Dango has given good advice here (that I will upvote). He has used a manual method to extract the raster data boundary you want to clip with into a vector dataset. If you want something automated you could try Raster to Polygon (Conversion) but the nature of your raster data may mean that cannot be used directly on it. I think Brad's answer may require higher than an ArcView license but the Footprints he mentioned look like they will be very useful to some so I will upvote that answer too. –  PolyGeo Sep 17 '11 at 7:38
    
Sorry Shanauk - My understanding of your question was that you had vector features that you wanted to extract ONLY where they intersected a raster feature. I've re-read your question, and that's still what I'm getting from it. You've also commented that you want the "clip feature" to be your raster. Can you give us some more details please? I don't quite understand exactly what you're trying to do. –  Dano Sep 17 '11 at 11:55
    
Dano, sorry for not explaining it in details. I have updated the question with details. Does that help in understanding my problem better? –  Shaunak Sep 17 '11 at 20:37
    
@PolyGeo: I have tried the Raster to Polygon after multiplying my raster with 0 to create a constant raster. But the tool doesnt support my raster (not in Geotiff neither in ADF). The error I get is "ERROR 000864 Input raster: The input is not within the defined domain. ERROR 000863: Invalid GP data type". –  Shaunak Sep 17 '11 at 20:47

@Dano showed a screenshot from the Clip tool in the Analysis toolbox, but there is another Clip tool which can be found in the Data Management toolbox, and it is that one which should be used to do this.

Set a feature class with your circle feature in it as the Output Extent and be sure to check the Use Input Features for Clipping Geometry box

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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