I can read in and output single .las files in a pipeline file.
How do I read in two .las files, merge them, then apply the filter and output based on the below example?
{
"pipeline":[
{
"type":"readers.las",
"filename":"E:\\offload\\3dspatial\\processed\\99.526\\201406071257\\201406071257.las",
"spatialreference":"EPSG:32635"
},
{
"type":"filters.chipper",
"capacity":600
},
{
"type":"writers.pgpointcloud",
"connection":"host='localhost' dbname='db' user='user' password='pw'",
"schema":"pointcloud_99_526",
"table":"pc_201406071257",
"compression":"dimensional",
"srid":"32635"
}
]
}
This seems to work just testing it.
{
"pipeline":[
{
"type":"readers.las",
"filename":"E:\\offload\\3dspatial\\processed\\99.526\\201607150650\\201607150650.las",
"spatialreference":"EPSG:32635",
"tag":"A"
},
{
"type":"readers.las",
"filename":"E:\\offload\\3dspatial\\processed\\99.526\\201607140910\\201607140910.las",
"spatialreference":"EPSG:32635",
"tag":"B"
},
{
"type":"filters.merge",
"tag":"merged",
"inputs":[
"A",
"B"
]
},
{
"type":"filters.chipper",
"capacity":600
},
{
"type":"writers.pgpointcloud",
"connection":<info>,
"schema":"pointcloud_99_526",
"table":"pc_merge_201607150650_201607140910",
"compression":"dimensional",
"srid":"32635"
}
]
}
Related
I'm trying to use a geographic coordinate with Echarts graph. For example, the graph example given on the website are as follows: [here is the example link about the graph][1]
[![example graph][2]][2]
the data format is as follows:
{
"nodes":[
{
"id":"0",
"name":"Myriel",
"symbolSize":19.12381,
"x":-266.82776,
"y":299.6904,
"value":28.685715,
"category":0
},
{
"id":"1",
"name":"Napoleon",
"symbolSize":2.6666666666666665,
"x":-418.08344,
"y":446.8853,
"value":4,
"category":0
}],
"links":[
{
"source":"1",
"target":"0"
},
{
"source":"2",
"target":"0"
}]}
The document says I can use geographic coordinate with geoIndex to assign the corresponding geographic coordinate components.So I constructed my own graph data which is as follows:
tmp = {
"nodes":[
{
"id":0,
"name":"A",
"x":106.715912,
"y":29.510934,
"value":2.7493110918413546,
"category":0
},
{
"id":1,
"name":"B",
"x":106.375811,
"y":29.242566,
"value":2.4366801109834597,
"category":1
},
{
"id":2,
"name":"C",
"x":106.628127,
"y":29.318595,
"value":1.0339437768234796,
"category":1
},
{
"id":3,
"name":"D",
"x":106.297996,
"y":29.512318,
"value":0.7788528349157652,
"category":0
}
],
"links":[
{
"source":"0",
"target":"1"
},
{
"source":"0",
"target":"2"
},
{
"source":"1",
"target":"2"
},
{
"source":"1",
"target":"3"
}
],
"categories":[
{
"name":"SectionA"
},
{
"name":"SectionB"
}
]
};
Then, I add the corresponding attribute coordinateSystem:'geo',while it does not work. When I comment out this line,it shows like as follows. However, the positional relationship between these points is not as shown in the figure.
[![my graph][3]][3]
So,
[1]: https://echarts.apache.org/examples/zh/editor.html?c=graph
[2]: https://i.stack.imgur.com/gVQeP.png
[3]: https://i.stack.imgur.com/iDNty.png
Some API geocode queries return double results when this is not warranted by the real data.
It will return 2 results with slightly different latitude and longitude and different LocationId's.
This makes it difficult if not impossible to decern which one is the correct result.
Example:
https://geocoder.ls.hereapi.com/6.2/geocode.json?apiKey=8888&city=Zutphen&country=NL
Returns:
{
"Response":{..
},
"View":[
{
"Result":[
{
"Relevance":1.0,
"MatchLevel":"city",
"MatchQuality":{
"City":1.0
},
"Location":{
**"LocationId":"here:cm:namedplace:23055957",**
"LocationType":"point",
**"DisplayPosition":{
"Latitude":52.1402,
"Longitude":6.19152**
},
...
},
"Address":{
"Label":"Zutphen, Gelderland, Nederland",
"Country":"NLD",
"State":"Gelderland",
"County":"Zutphen",
"City":"Zutphen",
"PostalCode":"7201",
"AdditionalData":[
{
"value":"Nederland",
"key":"CountryName"
},
{
"value":"Gelderland",
"key":"StateName"
},
{
"value":"Zutphen",
"key":"CountyName"
}
]
}
}
},
{
"Relevance":1.0,
"MatchLevel":"city",
"MatchQuality":{
"City":1.0
},
"Location":{
**"LocationId":"here:cm:namedplace:20201443",**
"LocationType":"point",
**"DisplayPosition":{
"Latitude":52.13764,
"Longitude":6.20777**
},
...
],
"ViewId":0
}
]
}
}
I wanted to ask if it is possible to repeat elements in a POST request in PAW and how to do so?
Basically, given the POST request BODY:
[
{ "zip":"DYNAMIC_VALUE" }
]
Can I then repeat this entry multiple times? Let's say I want to repeat this entry in the array 10 times, I would get for example:
[
{ "zip":"1234" },
{ "zip":"2543" },
{ "zip":"6543" },
{ "zip":"7645" },
{ "zip":"2654" },
{ "zip":"7568" },
{ "zip":"5364" },
{ "zip":"1313" },
{ "zip":"5432" },
{ "zip":"5634" }
]
And maybe I want to send an array with 1000 or more objects with a dynamic zip.
How do I do that?
Thank you :)
I am using Drupal 8 JSON:API to expose data to my Gatsby site. I have built a GraphQL query to expose a list of "officers" which contains a field with a relationship to a set of "service periods". The data returned by the API is correct, but I would like to filter for only one specific child record (service period) and can not figure out how to do that. My query is:
officerList: allGroupContentLodgeGroupNodeOfficer(filter: {relationships: {entity_id: {relationships: {field_position: {elemMatch: {relationships: {field_service_period: {drupal_internal__tid: {eq: 203}}}}}}}}}) {
edges {
node {
r: relationships {
entity_id {
r: relationships {
field_position {
r: relationships {
field_position {
name
}
field_service_period {
name
drupal_internal__tid
}
}
}
}
title
}
}
}
}
}
}
The resulting JSON set is:
"data": {
"officerList": {
"edges": [
{
"node": {
"r": {
"entity_id": {
"r": {
"field_position": [
{
"r": {
"field_position": {
"name": "Governor"
},
"field_service_period": {
"name": "2018 - 2019",
"drupal_internal__tid": 203
}
}
},
{
"r": {
"field_position": {
"name": "Junior Past Governor"
},
"field_service_period": {
"name": "2019 - 2020",
"drupal_internal__tid": 204
}
}
}
]
},
"title": "Tom Jones"
}
}
}
}
]
}
}
}
I understand the resulting set is correct because the child is within the root. However, I can not see how to filter the full query to include only certain child records. Is this even possible? I have seen some implementations of GraphQL that seem to allow filters to be placed on children, but I don't think this is possible in Gatsby.
I have searched everywhere for possible solutions and have been banging my head against the wall for a few days. Any insight is GREATLY appreciated!
TIA!
I'm using the enhanced ecommerce tracking from Google Analytics to send data like this in JS to GA:
ga("ec:addImpression", {
brand: null,
dimension2: "shop123",
id: 1,
list: "Search",
name: "Product 123",
position: 1
});
ga("send", "pageview");
Then, I use the Reporting API to generate some charts. Here, I want to filter by my custom dimension dimension2. The request looks like this:
{
"reportRequests":[
{
"dateRanges":[
{
"startDate":"2016-10-17",
"endDate":"2016-11-16"
}
],
"viewId":"132093148",
"metrics":[
{
"expression":"ga:productListViews"
}
],
"dimensions":[
{
"name":"ga:date"
},
{
"name":"ga:dimension2"
}
],
"dimensionFilterClauses":[
{
"filters":[
{
"dimension_name":"ga:dimension2",
"operator":"EXACT",
"expressions":[
"shop123"
]
}
]
}
]
}
]
}
However, this returns no results:
{
"reports":[
{
"columnHeader":{
"dimensions":[
"ga:date",
"ga:dimension2"
],
"metricHeader":{
"metricHeaderEntries":[
{
"name":"ga:productListViews",
"type":"INTEGER"
}
]
}
},
"data":{
"totals":[
{
"values":[
"0"
]
}
]
}
}
]
}
But when I remove the dimensionFilterClauses I get all the results, of course not filtered by dimension2.
Did I anything wrong when filtering for that dimension?
Change your string dimension_name for dimensionName and try.
As you can see in the examples: https://developers.google.com/analytics/devguides/reporting/core/v4/samples
"dimensionFilter":
{
"dimensionName":"ga:browser",
"operator":"EXACT",
"expressions":["Safari"]
}