Cannot view/access attribute data from KML file in QGIS - attributes

Using QGIS, when I convert a SHP file with several columns of attribute data into a KML for use in a Google Environment (e.g. Google Earth, Fusion Tables, Google Maps), I'm not able to view the attribute data following the conversion (while still using QGIS) — all I can see are two columns headers "Name" and "Description" with no cell values. Yet, if I take that same KML and load it into Google Fusion Tables, for example, suddenly all the attributes from the original SHP files are visible.
Is there a way to view the attributes of a KML while in QGIS?

I have not enough reputation to put this in a comment, thats why I give you the hit here...
Think, same problem is discussed here:Not Importing ExtendedData from KML and solution comes with gdal-2.0.2-4

Related

Azure Search - Highlights - Locating in image

Just looking for guidance or even a general outline on approach here.
I am using azure search to OCR a batch of pdfs. I have turned on hit highlighting and I am successfully getting results back there that I am looping through / displaying in my view for the end user. I was looking on expanding that functionality to show the pdf images with the highlighting on the images themselves like in the JFK azure example. I am not proficient in react and seem to be getting lost there.
I am assuming I need to save off the OCR images to a data store for reference using the normalized_images that are created? I do have pdfs locally I can load but assume the OCR images maybe different. Have turned on GeneratedNormalizedImagesPerPage and turned on cache which creates files in my storage account.
Then I assume I need to pull the associated image, display it, use the highlight results and pull a corresponding bounding box where the phrase was detected? Problem with that approach is that I do not see any association between the highlight hit and the location (bounding box) of the hit nor the associated image file the hit was on.
Probably way off on approach here but any guidance is appreciated.
Edit 1
I did noticed the items on this page in the JFK example: https://github.com/microsoft/AzureSearch_JFK_Files/tree/master/JfkWebApiSkills/JfkWebApiSkills
Would trying to replicate the ImageStore (so those are stored in my storage account) and then the HocrGenerator (appears to handle points in a doc) into my skillset for my index be the approach?
There are a few steps here:
you need to save the layoutText from the OCR skill somewhere the UI can access it. The JFK Files demo converts it to a HOCR (to display in the UI) and saves it in index as a field in the index so that it is retrieved in the search results. HOCR isn't necessary and you may find it more efficient to store the layout in blobs using a knowlege store object projection.
save the extracted images into blob storage using a file projection into the knowledge store. Keep in mind that the images may be resized in the process and the coordinates will match the resized image saved to the store. If you want to map the coordinates to the original image see this.
At search time, map the highlight to the the metadata. You will find this code in the nodejs frontend, however it may be simpler to follow in the original demo by following the code here. Essentially you just find the first occurrence of the highlighted word in the metadata, display the associated image, and calculate the bounding region of the word.

Loading Google Maps from a kml file on server

My website (www.boatingtrax.com) presents maps from google earth and google maps. I prepare the kml files and load the file to my server. I put links to the various kml files on my site (https://www.boatingtrax.com/notices-to-mariners/news-south-wales-notices-mariners/) and google earth formats are generated. NICE!
I update the kml files daily and a new google earth map is generated.
Google Maps is different. I can produce a google map using the kml file and embed the map on site or share the link Both work well. Also nice!
But I have to do that every time I change the kml files (which is daily). Painful!
Could anyone point me to a process so that I can keep Google Maps updated automatically?
Any help appreciated.
If I understand correctly, your issue is that every time you upload a new KML, it has a new filename, and therefore you need to change your Maps API code to point at the new file each time?
If so, you should probably check out KML Network Links. A KML NetworkLink is a small KML file that contains a pointer to another KML file.
In your case, what I would do is create one NetworkLink KML with a static filename, which always points at your latest data KML. Have your Maps API code load the NetworkLink file, and it will show the target KML. Each time you add a new data KML, you just have to upload a new copy of the NetworkLink KML (with the same filename), which points at the new data KML.
For details on KML Network Links, see these resources:
KML Tutorial - Network Links
KML Reference - NetworkLink
A few things to note... Maps API has some caching of KML files built in, so there may be a delay (minutes?) from when you update the NetworkLink file to when you see the new data on your map. Google Earth supports long strings of nested NetworkLinks, but Maps will only follow a limited number of NetworkLinks (10, I think?), so be careful if you go down the road of nesting them. Also, Google Maps API does not support all the KML elements which Earth does... details here.

Protect KML file from downloading or accessing

I am trying to protect my KML file, from being downloaded or its data extracted easily. All I want is the file to be viewed in google maps or google earth, but no one is allowed to download it or extract the data "easily" (the kml file isnt going to be available publicly). My kml files are a result of deep and exclusive analysis that is a signature I want to hide from competitors.
Also are there any alternatives to convert kml to a format that data cant be obtained easily from it. My KML files have polygons in 3D.
I understand the concept of everything that can be seen can be downloaded or extracted somehow,
I have 4 answers or 0 answers, depending on your project.
Using Google Maps Api for Business (~ 10.000$ per year) you can
generate a Client ID and use that to protect a Fusion Table (can
create in Google Drive) where you can import your KML and which you
then can display using the Google Maps Api. It would be the perfect solution, but without Google Maps Api for Business your Fusion Table is not protected and so anybody can access
it in Google Drive and view and copy-paste the Kml
representation of the polygons.
Using Google Maps Engine (/Lite) you can import your
Kml to Google as well (if you use Lite then you first need to import to Google
"My Maps" and from within Google Maps Engine Lite you can then
import from "My Maps"). I don't know the pricing for non-lite. A
Google Maps Engine Map can be shared so its only viewable and in
this only viewable version I have not found a way to download or
view the raw-kml-data which would be what we want. Sounds all good,
but you are limited to 3 layers in Maps Engine Lite and I have not found a way to import all my polygons (districts in
my case) into one layer at once. I can only import them bit by bit as it seems (managed to import 10 polygons with a total of 353 Points into one layer). Each import results in one layer, can't move stuff from one layer to another and for some reason there are some polygons that I can't seem to import. Edit:
I can import all polygons, one polygon (due to algorithmic simplification of my polygons) got an intersection (line crossing) and as soon as I fixed that part the import didn't throw any errors anymore, but I see now that I can only embed that map using an iframe having the legend included as well, so this solution is nothing for me.
Restrict access to a KML on your server to Google servers only using a white list of Google Maps servers which might request your
KML. Problem: can't find such a list online... must collect in some
way first.
Also there are blog entries Protecting KML Files from general public access in Google
Maps
and Protect KML / KMZ Files from Unauthorized Access Using
Cryptography
Your question is based on a fallacy of computer security known as "security through obscurity". The fallacy is this. You say you don't want it downloaded "easily." You can make it hard, but as long as its possible as soon as one person figures it out they write a script to do it automatically and its then "easy." There is no answer to your question because it is impossible. Any content you make available is pirateable, and any data is reconstructable.
Why not just save the kml file(s) and cut/paste onto a password encrypted usb drive, like Kingston or Kanguru defender. Then just open the kml from your usb disk.
you can check the $_SERVER["HTTP_USER_AGENT"] variable and if is from google then generate the kml from php.
$agent = "Kml-Google";
$google = strpos($_SERVER["HTTP_USER_AGENT"], $agent);
($google !== FALSE) or die;
header('Content-Type: application/vnd.google-earth.kml+xml kml');
header('Content-Disposition: attachment; filename="otras.kml"');
?>
<?xml version="1.0" encoding="UTF-8"?>
<kml xml ...

What is a 'Collada' scene graph?

What is a Collada scene graph?
Can I take a scene that I've downloaded from Google 3D warehouse and somehow convert it to a Collada scene graph?
Does the process somehow segment the scene?
COLLADA is the standard XML description language available for most if not all 3D applications. Google Earth is using COLLADA for the 3D models placed on to of the earth. Google Sketchup can import and export COLLADA models. Google Warehouse offer most if not all models in the COLLADA format. Google KMZ format is a ZIP file that contains COLLADA (.DAE) files(s), textures, and GIS placement information.
XML is a text based format, so you can look into a COLLADA document with any text editor, although a XML editor is highly recommended for large files, or for easier navigation. COLLADA is defined by its specification (in English and Japanese) and its Schema (.xsd) which enable COLLADA documents to be tested for validation by standard XML tools. Editors such as 'daenotepad' available on github will also provide help editing COLLADA documents based on the information stored in the schema.
A COLLADA document contains many different elements, one of the element is the < visual_scene > which contains the instance of geometries withing the the visual scene organized in a tree of locations. That is what is often referred incorrectly as the 'scene graph'. A scene graph is a run-time technology used by a lot of 3D rendering engines, which is similar to the but has many active run-time attributes such as 'switch' 'Level of detail' 'script' ... which COLLADA is not defining. COLLADA is merely defining the necessary data for enabling any applications, scene graph based or not, modeling tools or graphics engines to find the information they need a and communicate back and forth.

Excel to pdf conversion with a footer image

I need a way to convert my excel files to pdf that can have any no of rows. but the no of rows per each page is a constant and each page should have an image in the footer.
an example would be if i have 150 rows and the constants per page is 100 then i need to get a pdf file with two pages and each of these pages should have a footer image?
any idea how I can go about the same. I am thinking about writing a small program for the same. But I need suggestion regarding which tool to use for the conversion depending on the ease of use.
I am also thinking about maintaining a constants file that feeds in the required details. like no of rows, footer image location, file location etc.
Thanks. waiting for a reply.
Edit:
Well guys I have 1000 of such files and I cant possibly open each one of these files and add footer etc and saving it as pdf. I need to automate this.
Try the PDF Converter Services. It provides a web services based interface to carry out the conversion. You can also specify a watermark to add an image to the footer of each page.

Resources