Combination View Flat View Tree View
Threads [ Previous | Next ]
RE: Pixel extraction
toggle
Pixel extraction
1/29/18 5:56 PM
Does anyone have example how to use `gpt PixEx` for one point not a region and only one band (do not want to extract all bands):

something like this:


gpt PixEx lat lon pathinput\*.nc pathout\dat.txt


Any idea will be appreciated.
Flag Flag
RE: Pixel extraction
1/31/18 8:53 AM as a reply to hans M savoni.
It is not possible in this way.

If you don't want to create a graph xml file, you need at least a coordinate file which contains your coordinate.
You can create such a file for example by exporting a pin.
See also the online help or the help on the console when you call gpt -h PixEx and gpt -h

Your command line call would look the following:
1gpt PixEx -PsourceProductPaths=pathinput\*.nc -PoutputDir=pathout/dir -PoutputFilePrefix=MyPrefix


But you can also create a graph XML file. Use the one which is printed when calling gpt -h PixEx as a template and configure PixEx in the GUI (Utilities / Extract Pixel Values). Save the parameters and put them in the template.
Then your call would look like:
1gpt pixExGraph.xml


best wishes
Marco
Flag Flag
RE: Pixel extraction
2/1/18 9:56 AM as a reply to Marco Peters.
Thanks.

I do not see where the coordinates file in your first command?

I noticed that the results (for all coordinates) are saved to only one .txt file. Is it possible to save the results (extraction) of each lat and lon to a .txt file. In other words to replace "prifix" with the name of the coordinates?
Flag Flag
RE: Pixel extraction
1/31/18 6:18 PM as a reply to hans M savoni.
Sorry, I forgot the coordinate file in the command line call. It should be:

1gpt PixEx -PcoordinatesFile=path/to/coordinates_file.txt -PsourceProductPaths=pathinput\*.nc -PoutputDir=pathout/dir -PoutputFilePrefix=MyPrefix


No, all extracted measurements are collected in one file. You need to rearrange the results to your needs.
Flag Flag
RE: Pixel extraction
2/1/18 6:13 PM as a reply to Marco Peters.
The best choic for me is
gpt pixExGraph.xml

but it is very slow. Is there a way to speed it up or to use multicores?


another question: it extracts all bands available in the file. I can not see where can I select one band (variables) to be extracted?
Thanks
Flag Flag
RE: Pixel extraction
2/4/18 4:34 PM as a reply to hans M savoni.
No, there is no way to improve the speed.
Single bands can not be selected. You can only select to include bands, tie-point grids and masks.

1<exportBands>boolean</exportBands>
2<exportTiePoints>boolean</exportTiePoints>
3<exportMasks>boolean</exportMasks>


But you can add another operator before the PixEx. The Subset operator. There you can define which bands you like to include.
Flag Flag

 

Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums: