Re: [Qgis-user] How to get rid of the rest of the World?

2014-04-23 Thread Murkor
how to make a rectangular area of longitude and latitude
coordinates that enables to cut away the area not needed in other layers?

In QGIS 2.2 (and just about any GIS that has geoprocessing tools) there are
two ways to extract data.

The first is to clip the data from the existing file using another polygon
file:
1.  on the manage layers toolbar click New Shapefile Layer;
2.  enter info on file geometry (polygon), name, and coordinate system
(don't need to worry about attributes);
3.  click 'OK;
4.  name file and choose storage location;
5.  click Save;
6.  name of new file appears in 'Layers List;
7.  click on name of new file to highlight it;
8.  on the digitising toolbar click Toggle Editing (little pencil
button);
9.  click Add Feature button;
10.  click in map window to create your polygon (left click for each corner
and right click to finish);
11.  click Save Layer Edits button;
12.  click 'Toggle Editing button;
13.  in menu click Processing... Toolbox;
14.  in toolbox (simplified view) search clip;
15.  double click geoalgorithms... vector... overlay... clip;
16.  input layer is the layer you want to clip (make smaller);
17.  clip layer is the polygon you just made;
18.  clipped output is what and where you wish;
19.  click Run

NOTES:
-You can turn on any toolbars that you don't see in the menu under
Settings... Toolbars
-If you load the layer you want to clip into the map window before clipping
it means you don't have to navigate to it; you can just pick it from a
dropdown.
-MAKE SURE THE COORDINATE REFERENCE SYSTEM (CRS) FOR THE PROJECT (Setting...
Project Properties... CRS) AND EACH OF THE FILES (input and clip) ARE THE
SAME!
-If you want to be more accurate with your corners than a quick and dirty
hand digitised job then you can import the coordinates for the corners you
want using the 'XYtools plugin to import spreadsheet files with xy
coordinate fields/columns; make a point file and then snap your polygon file
to the points when you create the polygon feature.
-You can also create a polygon with accurate coordinates for corners using
Python code here:
https://code.google.com/p/pyshp/

The second way is to run a SQL query on the attribute table (or manually
select the polygons you want to extract) for the polygons you want and then
:
1.  right click the filename in the layer list;
2.  click Save as;
3.  name and locate file and choose CRS;
4.  click OK.

This won't give you a rectangular extent (unless you have unusual data), but
will give you exactly the polygons you want.

To clip the raster you can use the Toolbox again:
Geoalgorithms... Raster - vector... Raster - vector operations... Clip grid
with polygon

YOU MUST HAVE SAGA INSTALLED ON YOUR MACHINE TO USE THIS TOOL (standard with
Osgeo4w install of QGIS)
You can also use the command line shell installed when you install FWTools
to run gdal_translate to clip rasters - 
Like so:
http://www.surfaces.co.il/clipping-a-raster-with-gdal/

I repeat just want a specified area that easily can be determined by
longitude and latitude
coordinates.

Then use the spreadsheet import or python scripting approaches to create a
clipping polygon with the desired coordinates. Using the clip tools this is
simple as after you get your clipping polygon created.

Cheers,
Mike

Qgis-user mailing list
Qgis-user@.osgeo
http://lists.osgeo.org/mailman/listinfo/qgis-user





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-get-rid-of-the-rest-of-the-World-tp5136462p5136667.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] How to get rid of the rest of the World?

2014-04-22 Thread kmgkmgkmgkmg .
Hello everyone..

I will be going on a little bit here now..

Wonder how to create a clip/mask layer or do something to the same effect?
More specifically, how to make a rectangular area of longitude and latitude
coordinates that enables to cut away the area not needed in other layers?

Since stuck with a quarter of the World or even the entire World in my
little project. This question is for shape file layers mostly, have not
gotten to the .tiff yet. They are not global though larger then needed. So
a universal solution for both types would be nice.

Is there a python console command to do this?
Is there a plugin to do this?
Is there a online service to create such a layer?
Is it possible from within QGIS?

Have tried the make a rectangle plugin, it cuts out zero features.
Also tried clipping with a layer of not the right shape and it says that
they do not have the right projection, even though it looks as they do, and
end up with a blank layer.

Sure plenty people have this problem, though the forums do not have any
clear explanations as I found nothing that really explains, even youtube
got one but that is for regional borders.

Is there some way of just knocking in the longitude and latitude to do this?
Please assist. Do not get why this should be so difficult.

Why does not QGIS ask first thing which area of the planet you wish to work
on a project? And then just filter out it automatically when you load layer
that include more than that? Perhaps this could be a feature of a future
release?

With hopes for many answers and simple solutions. I repeat just want a
specified area that easily can be determined by longitude and latitude
coordinates.

Yours hopefully..
Marcus
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to get rid of the rest of the World?

2014-04-22 Thread Simon Cropper

Marcus,

I think what you are asking is can you just view the area that you are 
working on and have QGIS hide or filter out those feature not within the 
area of concern.


From my understanding is no. Well not exactly.

My understanding is that shapefiles will allways be processed regardless 
of whether they are visable. Feature may not be visible if they are 
outside the view or transparent.


You have two simple solutions to this problem.

1. Create a routine to, or manually, clip all the shapefiles in your 
project based on a reference polygon bounded by your lat/longs.
2. Create a polygon covering the world and punch a hole through it, 
essentially creating a window bounded by your lat/longs. The polygon can 
be made opaque/white making it the same as the screen/page or 
semi-transparent, essentially fading the underlying features (nice 
effect in reports).


On 22/04/14 23:57, kmgkmgkmgkmg . wrote:

Hello everyone..

I will be going on a little bit here now..

Wonder how to create a clip/mask layer or do something to the same effect?
More specifically, how to make a rectangular area of longitude and
latitude coordinates that enables to cut away the area not needed in
other layers?

Since stuck with a quarter of the World or even the entire World in my
little project. This question is for shape file layers mostly, have not
gotten to the .tiff yet. They are not global though larger then needed.
So a universal solution for both types would be nice.

Is there a python console command to do this?
Is there a plugin to do this?
Is there a online service to create such a layer?
Is it possible from within QGIS?

Have tried the make a rectangle plugin, it cuts out zero features.
Also tried clipping with a layer of not the right shape and it says that
they do not have the right projection, even though it looks as they do,
and end up with a blank layer.

Sure plenty people have this problem, though the forums do not have any
clear explanations as I found nothing that really explains, even youtube
got one but that is for regional borders.

Is there some way of just knocking in the longitude and latitude to do this?
Please assist. Do not get why this should be so difficult.

Why does not QGIS ask first thing which area of the planet you wish to
work on a project? And then just filter out it automatically when you
load layer that include more than that? Perhaps this could be a feature
of a future release?

With hopes for many answers and simple solutions. I repeat just want a
specified area that easily can be determined by longitude and latitude
coordinates.

Yours hopefully..
Marcus


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user




--
Cheers Simon

   Simon Cropper - Open Content Creator

   Free and Open Source Software Workflow Guides
   
   Introduction   http://www.fossworkflowguides.com
   GIS Packages   http://www.fossworkflowguides.com/gis
   bash / Pythonhttp://www.fossworkflowguides.com/scripting
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] How to get rid of the rest of the World?

2014-04-22 Thread Alexandre Neto
Hello Marcus,

The feature I believe you are describing is being worked by a few
developer, have a look in this pull request:

https://github.com/qgis/QGIS/pull/1254

Maybe it lands in QGIS 2.4 :)

Alexandre Neto



On Tue, Apr 22, 2014 at 2:57 PM, kmgkmgkmgkmg . km.gul...@gmail.com wrote:

 Hello everyone..

 I will be going on a little bit here now..

 Wonder how to create a clip/mask layer or do something to the same effect?
 More specifically, how to make a rectangular area of longitude and
 latitude coordinates that enables to cut away the area not needed in other
 layers?

 Since stuck with a quarter of the World or even the entire World in my
 little project. This question is for shape file layers mostly, have not
 gotten to the .tiff yet. They are not global though larger then needed. So
 a universal solution for both types would be nice.

 Is there a python console command to do this?
 Is there a plugin to do this?
 Is there a online service to create such a layer?
 Is it possible from within QGIS?

 Have tried the make a rectangle plugin, it cuts out zero features.
 Also tried clipping with a layer of not the right shape and it says that
 they do not have the right projection, even though it looks as they do, and
 end up with a blank layer.

 Sure plenty people have this problem, though the forums do not have any
 clear explanations as I found nothing that really explains, even youtube
 got one but that is for regional borders.

  Is there some way of just knocking in the longitude and latitude to do
 this?
 Please assist. Do not get why this should be so difficult.

 Why does not QGIS ask first thing which area of the planet you wish to
 work on a project? And then just filter out it automatically when you load
 layer that include more than that? Perhaps this could be a feature of a
 future release?

 With hopes for many answers and simple solutions. I repeat just want a
 specified area that easily can be determined by longitude and latitude
 coordinates.

 Yours hopefully..
 Marcus

 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to get rid of the rest of the World?

2014-04-22 Thread Alex Mandel
I usually make a new vector Layer. Then you can draw or use the
numerical vector editor to add a polygon. This polygon can then be used
as a clipping mask. Simply having a layer of a given extent isn't
enough, you have to have a polygon object in the layer.

As for why this isn't the way it already is, well QGIS is not ArcINFO or
GRASS where all data in one map are forced into the same projection and
you can set an extent property for the analysis. That's a different
concept of how to do GIS. One that is not very forgiving to projection
on the fly.

Thanks,
Alex

On 04/22/2014 07:24 AM, Simon Cropper wrote:
 Marcus,
 
 I think what you are asking is can you just view the area that you are
 working on and have QGIS hide or filter out those feature not within the
 area of concern.
 
 From my understanding is no. Well not exactly.
 
 My understanding is that shapefiles will allways be processed regardless
 of whether they are visable. Feature may not be visible if they are
 outside the view or transparent.
 
 You have two simple solutions to this problem.
 
 1. Create a routine to, or manually, clip all the shapefiles in your
 project based on a reference polygon bounded by your lat/longs.
 2. Create a polygon covering the world and punch a hole through it,
 essentially creating a window bounded by your lat/longs. The polygon can
 be made opaque/white making it the same as the screen/page or
 semi-transparent, essentially fading the underlying features (nice
 effect in reports).
 
 On 22/04/14 23:57, kmgkmgkmgkmg . wrote:
 Hello everyone..

 I will be going on a little bit here now..

 Wonder how to create a clip/mask layer or do something to the same
 effect?
 More specifically, how to make a rectangular area of longitude and
 latitude coordinates that enables to cut away the area not needed in
 other layers?

 Since stuck with a quarter of the World or even the entire World in my
 little project. This question is for shape file layers mostly, have not
 gotten to the .tiff yet. They are not global though larger then needed.
 So a universal solution for both types would be nice.

 Is there a python console command to do this?
 Is there a plugin to do this?
 Is there a online service to create such a layer?
 Is it possible from within QGIS?

 Have tried the make a rectangle plugin, it cuts out zero features.
 Also tried clipping with a layer of not the right shape and it says that
 they do not have the right projection, even though it looks as they do,
 and end up with a blank layer.

 Sure plenty people have this problem, though the forums do not have any
 clear explanations as I found nothing that really explains, even youtube
 got one but that is for regional borders.

 Is there some way of just knocking in the longitude and latitude to do
 this?
 Please assist. Do not get why this should be so difficult.

 Why does not QGIS ask first thing which area of the planet you wish to
 work on a project? And then just filter out it automatically when you
 load layer that include more than that? Perhaps this could be a feature
 of a future release?

 With hopes for many answers and simple solutions. I repeat just want a
 specified area that easily can be determined by longitude and latitude
 coordinates.

 Yours hopefully..
 Marcus


 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

 
 

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user