In the TNT application at Statnett we are seeking to collect line and point geospatial features through the FeatureAPI.
We have a dataset that has been populated with data about powerlines and substations, and we want to query the client for all of the features in each of these seperately. As there is no list() method in the FeatureAPI, and the search method is limited to 1000 results, we try to do this using the searchStream() method. Our query looks like this:
client.geospatial.feature.searchStream('ACLineSegment', {
limit: 10000,
output: { jsonStreamFormat: 'NEW_LINE_DELIMITED' as const }
});
This seems to work fine for the ‘ACLineSegment’ features but when i replace it with ‘Substation’ the call returns an empty string. I’ve tested with the regular search() and this returns features so I would expect the searchStream method to find these as well. Even stranger is that i quickly tested this functionality before the weekend and it seemed to work fine for ‘Substation’ then. This is however before the line data was uploaded.
From where I sit the most likely explanation seems to be some hickup in JavaScript SDK. Any help solving this or alternate method for listing all features of a certain FeatureType would be much appreciated.