OkMap forum
OkMap forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 OkMap Forum - English
 Use of the software
 Imagery added to GeoPDF?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

mjlisz

USA
8 Posts

Posted - 20/05/2022 :  08:06:33  Show Profile  Reply with Quote
I tried loading a USGS generated GeoPDF topo into OkMap. It took a few minutes but finally seemed to load. The odd thing is that there was imagery in the display that I don't believe belonged there, although I can't be certain. It looked like satellite or overflight imagery superimposed on the topo map. The imagery does not show up when displayed in any other viewer. This imagery subsequently gets incorporated in any conversions I do and detracts from the topo vector data. Does anyone know if the USGS GeoPdf's contain imagery data or whether OkMap might add this automatically somehow? Or how to get rid of it? Thanks in advance. -mike

okmap

Italy
2566 Posts

Posted - 20/05/2022 :  09:17:33  Show Profile  Visit okmap's Homepage  Reply with Quote
Hello Mike,
can you send me the map so i can do some tests?
You can send it to info@okmap.org.
Thanks.
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 22/05/2022 :  17:28:24  Show Profile  Reply with Quote
Hey, Thanks for your reply. After many hours of experimenting, I was able to determine that the image file is included in the GeoPDF file downloaded from the USGS Mapstore. It is included as a layer in the GeoPDF. Which leads to my next task of how to get rid of it. Does OkMap provide any such functionality? Thanks again. -mike
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 22/05/2022 :  19:45:02  Show Profile  Visit okmap's Homepage  Reply with Quote
Yes. Make sure to have installed the latest version of OkMap.
In the load PDF map parameters, use the GDAL_PDF_LAYERS_OFF parameter to list (separated by comma) the layers you don't want lo load.
The name of the layers can be listed opening the PDF with Acrobat.
For details see PDF raster driver at https://gdal.org/drivers/raster/pdf.html#raster-pdf
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 22/05/2022 :  21:53:23  Show Profile  Reply with Quote
That is a great feature. But when I try to load the map and the GDAL parameter box comes up, one of two things happens: 1 it already includes the GDAL_PDF_DPI 300 parameter and if I add the on you state (separated by comma) it returns and error saying "Too many command options"; or 2 if I delete the GDAL_PDF_DPI 300 before adding your GDAL_PDF_LAYERS_OFF Orthoimage (Orthoimage being the name of the layer from Acrobat), it still loads the image. Am I doing that correctly? Thanks.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 23/05/2022 :  10:30:19  Show Profile  Visit okmap's Homepage  Reply with Quote
It seems that GDAL (used for converting PDF to GeoTiff) accepts only one parameter.
But you have a chance:
1. Replace the parameter proposed by OkMap with:
GDAL_PDF_LAYERS "Images"
2. If you need to increase the dpi anyway, add:
SET "GDAL_PDF_DPI = 300"
to environment variables (before to use OkMap)
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 23/05/2022 :  21:09:14  Show Profile  Reply with Quote
Didn't look like my last reply posted. But basically, your idea worked. Looked but could not find where to set environment variables. Could you direct me where to find that Thanks. -mike
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 24/05/2022 :  10:00:43  Show Profile  Visit okmap's Homepage  Reply with Quote
To set environment variables, follow:
1. On the Windows taskbar, right-click the Windows icon and select System.
2. In the Settings window, under Related Settings, click Advanced system settings....
3. On the Advanced tab, click Environment Variables....
4. Click New to create a new environment variable.
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 25/05/2022 :  17:35:54  Show Profile  Reply with Quote
Thanks. I see that was not really a OkMap question. I appreciate you answering it anyway. I am still experimenting with the program but it is working well for me. Thanks for all your help. Regards. -mike
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 25/05/2022 :  17:38:56  Show Profile  Visit okmap's Homepage  Reply with Quote
Thanks and have fun!
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 27/05/2022 :  16:33:07  Show Profile  Reply with Quote
Hi again. Just wondered if you might have some additional insight on Geopdf layers. The GDAL_PDF_LAYERS and GDAL_PDF_LAYERS_OFF environment variable do not seem to work on all layers in the my USGS geopdf's. Also, although the syntax I have been able to find online indicates that I should be able to affect multiple layers with a single command separated by commas, I can't seem to get that to work either as a Windows environment value (just effects the first layer given) or in OkMap (returns an error as I mentioned previously). Any help you can give appreciated but don't stress over it. I have most of the functionality I need working. Thanks again.
-
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 27/05/2022 :  20:46:33  Show Profile  Visit okmap's Homepage  Reply with Quote
Please send me the GeoPDF and tell me which layers you want to get.
So I'll do some tests.
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 28/05/2022 :  15:25:48  Show Profile  Reply with Quote
Yes. I did send an email several days ago with a geopdf attached if that came through. The file size was about 55 Mbytes which may have exceeded some email limit of some kind. Perhaps you could let me know if you received that one? If not I can try finding a smaller file.

The GDAL_PDF variables seemed to work fine with two layers "Images" and "Barcode", one or the other, but I could find no way to turn them both off even though the syntax indicates I should be able to do both at once if separated by comma. "Images" contains a sublayer "Orthoimage" and either one of those toggles the image on or off with the variable set appropriately.

In Adobe Reader "Map Collar" will turn most of the text off on the topo border. But does not seem to do anything in OkMap with this set to GDAL_PDF_LAYER_OFF if I turn images off in Windows environment variables. Or turns "Images" off (but leaves the "Map Collar" on)if I use it in OkMap.

Anyway, I don't want to get to confusing. Perhaps I am not sophisticated or knowledgeable enough in using the variables in either Windows or OkMap and am confusing myself. Glad to provide any additional info I can.

And Thanks for all your help. -mike
Go to Top of Page

mjlisz

USA
8 Posts

Posted - 28/05/2022 :  15:44:55  Show Profile  Reply with Quote
I should add that the final goal would be to eliminate the "Images", "Barcode", "Map Collar" (and all its sub layers), and "Map Frame" sublayer "Projection and Grids". leaving the rest visible. I may be able to achieve this working one file at a time in Adobe Acrobat. But I do not currently have this software and would not be able to utilize OkMaps batch feature. Thanks again. -mike
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 28/05/2022 :  18:14:12  Show Profile  Visit okmap's Homepage  Reply with Quote
I did some tests with the PDF you sent me but I couldn't get what you want.
OkMap uses version 3.3.1 which is not the latest.
Maybe a GDAL version upgrade could help.
It will take me some time to rehearse.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 29/05/2022 :  10:19:29  Show Profile  Visit okmap's Homepage  Reply with Quote
In the meantime, you can contact the GDAL developers and submit your case. If they answer you, let me have their suggestions please.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
OkMap forum © 2018 OkMap Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07