Autodesk Forge ../photo-to-3d/v1/file Error Code 14 - autodesk-forge

Good Evening,
im geting the following error
{
"Usage": "0.55849504470825",
"Resource": "/file",
"Error": {
"code": "14",
"msg": "Specified values are invalid"
}
}
im trying to post a survey file to to the photo scene - following this documentation the file i have given the extension type .gcp and formatted it as a xml as shown on the example
<?xml version="1.0" encoding="UTF-8"?>
<surveydata coordinatesystem="LL84" description="Local coordinatesystem; meters" epsgcode="27700">
<markers>
<marker id="1" name="C2">
<images>
<image name="I100_0413_0027.jpg" xpixel="452" ypixel="401"/>
<image name="I100_0413_0028.jpg" xpixel="454" ypixel="1105"/>
<image name="I100_0413_0029.jpg" xpixel="464" ypixel="1840"/>
<image name="I100_0413_0030.jpg" xpixel="455" ypixel="2564"/>
</images>
<gcp x="539840.423" y="263277.897" z="16.097" checkpoint="false"/>
</marker>
<marker id="2" name="C3">
<images>
<image name="I100_0413_0009.jpg" xpixel="1887" ypixel="488"/>
<image name="I100_0413_0010.jpg" xpixel="1877" ypixel="1236"/>
<image name="I100_0413_0011.jpg" xpixel="1868" ypixel="1958"/>
<image name="I100_0413_0012.jpg" xpixel="1860" ypixel="2681"/>
<image name="I100_0413_0013.jpg" xpixel="1850" ypixel="3400"/>
</images>
<gcp x="539783" y="263219.485" z="16.511" checkpoint="false"/>
</marker>
<marker id="3" name="C4">
<images>
<image name="I100_0413_0036.jpg" xpixel="4255" ypixel="348"/>
<image name="I100_0413_0037.jpg" xpixel="4211" ypixel="1049"/>
<image name="I100_0413_0038.jpg" xpixel="4167" ypixel="1758"/>
<image name="I100_0413_0039.jpg" xpixel="4125" ypixel="2460"/>
<image name="I100_0413_0040.jpg" xpixel="4063" ypixel="3168"/>
</images>
<gcp x="539845.368" y="263230.711" z="15.852" checkpoint="false"/>
</marker>
</markers>
</surveydata>
on the creation of the scene i have set format=rcs-scenetype=aerial
this is the first time i have tried a survey file and i'm unsure what 'values' are invalid, could anyone help?

According to Survey File Example in documentation, when you specify coordinate system as "LL84":
<surveydata coordinatesystem="LL84" ...
it expects in gcp the long, lat and alt:
<gcp long="38.014125" lat="-122.540530" alt="2010.200000" checkpoint="false"/>
In your case, you specify the gcp as x,y,z:
<gcp x="539840.423" y="263277.897" z="16.097" checkpoint="false"/>
Thus, try to change the coordinate system as "XYZ":
<surveydata coordinatesystem=“XYZ” ...
Although documentation states that "only LL84 is supported for now.", this should do the trick.

Related

Wavy text with React Next.js - HTML code convert into React

Trying to convert this code:
.wavy-text{filter:url('#wavy')}
<h1 class="wavy-text">Wavy Text Generator</h1>
<svg width="100%" height="100%" style="display:none;">
<defs>
<filter id="wavy" filterUnits="userSpaceOnUse" x="0" y="0">
<feTurbulence id="wave-animation" numOctaves="1" seed="1" baseFrequency="0 0"></feTurbulence>
<feDisplacementMap scale="10" in="SourceGraphic"></feDisplacementMap>
</filter>
<animate xlink:href="#wave-animation" attributeName="baseFrequency" dur="3s" keyTimes="0;0.5;1" values="0.0 0.04;0.0 0.07;0.0 0.04" repeatCount="indefinite">
</animate>
</defs>
</svg>
into component in React with Next.js.
So I would like to use it as a component where I can put my own text and re-use it, but I got no idea how to convert that kind of code into React Next friendly mode.
Where does that code even take itss css class .wavy-text styles?
Original source for the code:
http://www.coding-dude.com/wp/wavy-text-generator/

What should I do with vector icon to apply it to the ApplicationBarIconButton

I mean, say, I have the following code, which represents an icon:
<?xml version="1.0" encoding="utf-8"?>
<Canvas
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="appbar_information_circle" Width="76" Height="76"
Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
<Path Width="38" Height="38" Canvas.Left="19" Canvas.Top="19" Stretch="Fill"
Fill="#FF000000" Data="F1 M 38,19C 48.4934,19 57,27.5066 "/>
How to set the result to the ApplicationBarIconButton IconUri?
Can't be done. Here is a wpdev.uservoice request that you can upvote if you want to see this functionality added.
http://wpdev.uservoice.com/forums/110705-dev-platform/suggestions/2643929-vector-tiles-app-list-icons-and-app-bar-icons

Exception on trying to change the state in Flex 3

I am trying to change the stage state to different state on click of a button. The problem is some times am getting exception as The supplied DisplayObject must be child of the caller.
Here is what am trying to do to change the state
this.currentState = 'fullScreen';
here this is a canvas.
Here is the MXML for the State fullscreen
<mx:State name="fullScreen">
<mx:RemoveChild target="{lstExpert}"/>
<mx:RemoveChild target="{screenToggle}"/>
<mx:AddChild relativeTo="{outContainer}" position="firstChild">
<mx:HBox id="topHeaderBox" horizontalAlign="left" verticalAlign="middle" width="98.5%" height="60"/>
</mx:AddChild>
<mx:AddChild relativeTo="{topHeaderBox}" position="firstChild" >
<mx:Label id="lblCourseName" width="100%" text="Name" color="#ffffff" fontFamily="Arial" fontSize="14" fontWeight="bold" height="20" />
</mx:AddChild>
<mx:AddChild target="{screenToggle}" relativeTo="{lblCourseName}" position="after" />
<mx:AddChild relativeTo="message" position="before">
<mx:Spacer id="Bar" height="5" width="2" />
</mx:AddChild>
</state>
What would be the mistake here?
You might want to bind the relativeTo property value of the last AddChild object. Meaning, to write it like this:
<mx:AddChild relativeTo="{message}" position="before">
Assuming you have an element with that id.
Hope this helps.

Convert XmlSlurper GPathResult to JSON string

After doing a lot of Googling.....
Is there an "easy way" of converting XMLSlurper results (GPathResult) to JSON?
I have added a sample XML file which I want to fetch server side, store it in a DB (JSON) and dump to a browser page for javascript processing...
Thanks!
Sander
See the following XML file.....:
<OpenSearchDescription xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<opensearch:Query searchTerms="tt0137523"/>
<opensearch:totalResults>1</opensearch:totalResults>
<movies>
<movie>
<popularity>3</popularity>
<translated>true</translated>
<language>en</language>
<original_name>Fight Club</original_name>
<name>Fight Club</name>
<alternative_name>El club de la lucha</alternative_name>
<type>movie</type>
<id>550</id>
<imdb_id>tt0137523</imdb_id>
<url>http://www.themoviedb.org/movie/550</url>
<overview>A lonely, isolated thirty-something young professional seeks an escape from his mundane existence with the help of a devious soap salesman. They find their release from the prison of reality through underground fight clubs, where men can be what the world now denies them. Their boxing matches and harmless pranks soon lead to an out-of-control spiral towards oblivion.</overview>
<votes>15</votes>
<rating>8.2</rating>
<certification>R</certification>
<released>1999-09-16</released>
<runtime>138</runtime>
<categories>
<category type="genre" name="Crime" url="http://themoviedb.org/genre/crime" id="80"/>
<category type="genre" name="Drama" url="http://themoviedb.org/genre/drama" id="18"/>
<category type="genre" name="Thriller" url="http://themoviedb.org/genre/thriller" id="53"/>
</categories>
<images>
<image type="poster" url="http://hwcdn.themoviedb.org/posters/f84/4bc908ae017a3c57fe002f84/fight-club-mid.jpg" size="mid" id="4bc908ae017a3c57fe002f84"/>
<image type="poster" url="http://hwcdn.themoviedb.org/posters/f84/4bc908ae017a3c57fe002f84/fight-club-cover.jpg" size="cover" id="4bc908ae017a3c57fe002f84"/>
<image type="poster" url="http://hwcdn.themoviedb.org/posters/f84/4bc908ae017a3c57fe002f84/fight-club-thumb.jpg" size="thumb" id="4bc908ae017a3c57fe002f84"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f55/4bc908a8017a3c57fe002f55/fight-club-original.jpg" size="original" id="4bc908a8017a3c57fe002f55"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f55/4bc908a8017a3c57fe002f55/fight-club-poster.jpg" size="poster" id="4bc908a8017a3c57fe002f55"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f55/4bc908a8017a3c57fe002f55/fight-club-thumb.jpg" size="thumb" id="4bc908a8017a3c57fe002f55"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f51/4bc908a6017a3c57fe002f51/fight-club-original.jpg" size="original" id="4bc908a6017a3c57fe002f51"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f51/4bc908a6017a3c57fe002f51/fight-club-poster.jpg" size="poster" id="4bc908a6017a3c57fe002f51"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f51/4bc908a6017a3c57fe002f51/fight-club-thumb.jpg" size="thumb" id="4bc908a6017a3c57fe002f51"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f4d/4bc908a5017a3c57fe002f4d/fight-club-original.jpg" size="original" id="4bc908a5017a3c57fe002f4d"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f4d/4bc908a5017a3c57fe002f4d/fight-club-poster.jpg" size="poster" id="4bc908a5017a3c57fe002f4d"/>
<image type="backdrop" url="http://hwcdn.themoviedb.org/backdrops/f4d/4bc908a5017a3c57fe002f4d/fight-club-thumb.jpg" size="thumb" id="4bc908a5017a3c57fe002f4d"/>
</images>
<version>8</version>
<last_modified_at>2010-04-26 23:08:53</last_modified_at>
</movie>
</movies>
</OpenSearchDescription>
If you are already using Grails, you might take a look at Grails Converters.
Grails Converters
They offer a quick way of consuming api XMLs and converting them to JSON.

How to put svg+xml into css style document with out encoding it into base64?

currently I have something like:
background:url(data:image/svg+xml;
base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzYzNTZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM3NWI2ZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
Which decoded would look like:
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">
<linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#6356ff" stop-opacity="1"/>
<stop offset="100%" stop-color="#75b6ff" stop-opacity="1"/>
</linearGradient>
<rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" />
</svg>
I wonder if it is somehow possiple to have it in form of xml inside css document (not creating seprate file)?
You can supply your data in url-safe ASCII, encoded with %xx hex values, if you skip ;base64
Try this...
background:url(data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%0A%20%20%3ClinearGradient%20id%3D%22grad-ucgg-generated%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%236356ff%22%20stop-opacity%3D%221%22%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%2375b6ff%22%20stop-opacity%3D%221%22%2F%3E%0A%20%20%3C%2FlinearGradient%3E%0A%20%20%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23grad-ucgg-generated)%22%20%2F%3E%0A%3C%2Fsvg%3E);
I think the only way you will get something like this is if you preprocess your CSS. Here's a simple way to do it with PHP. First, you need to rename your CSS file so that PHP will process it. Append .php to the filename, so that it's named something like style.css.php. Then you can use this code in that file:
<?php
$str = <<<EOS
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">
<linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#6356ff" stop-opacity="1"/>
<stop offset="100%" stop-color="#75b6ff" stop-opacity="1"/>
</linearGradient>
<rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" />
</svg>
EOS;
$b64 = base64_encode($str);
?>
.element {
background:url(data:image/svg+xml;base64,<?php echo $b64 ?>);
}
Then, update your HTML to point to the new filename. Once you do that, it should just work. You'll be incurring some additional processing overhead, because PHP will have to execute this code every time your CSS file is loaded.