Skip to content

Area fra eksternal#64

Open
MalteStr wants to merge 7 commits intongu:masterfrom
MalteStr:area_fra_eksternal
Open

Area fra eksternal#64
MalteStr wants to merge 7 commits intongu:masterfrom
MalteStr:area_fra_eksternal

Conversation

@MalteStr
Copy link
Contributor

Hente områder også fra eksternal API.

orderDownload bruker en loop for å gå gjennom alle resterende områder og da bør det bare sende et område om gangen til eksternal API.

Copy link
Contributor

@bgrotan bgrotan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Om en bruker ønsker å laste ned for 20 kommuner, vil dette da ende opp i 20 bestillinger?
Det er ikke helt slik vi ønsker det i så fall. Sett fra et brukerperspektiv, må vi gjøre det vi kan for å samle bestilte områder til så få leveranser som mulig. Tenker at heller bakerste instans kan splitte opp i enkelt-bestillinger om ønskelig.

@MalteStr
Copy link
Contributor Author

Det vil da delt opp til 20 bestillinger.
Hos geonorge finnes det et bundle-endpoint i versjon 3, som skal samle hele bestillingen i et fil.
https://nedlasting.geonorge.no/Help/Api/GET-api-download-order-orderUuid-bundle

Men koden her kan også endres til å sende AreaList til external-API. Vi kan la koden liggende her til jeg får tid til å se på det eller dere tilpasser den.

@bgrotan
Copy link
Contributor

bgrotan commented Mar 12, 2019

Tanken med det endepunktet var at APIet selv skal bundle sammen de ulike produktene til en zip-fil, altså ikke noe klienten som (her da er Geonorge) selv skal bundle sammen. dataBundling-oppgaven ligger ansvarliggjort hos API-eier.


public abstract List<Format> getFormats() throws IOException;

public abstract List<Area> getArea() throws IOException;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be getAreas()?

public abstract String submitJob(Format format, Projection projection, String email, String coordinates) throws IOException;

public abstract String submitJob(Format format, Projection projection, String email, List<Area> areas, String mapSelectionLayer) throws IOException;
public abstract String submitJob(Format format, Projection projection, String email, Area area, String mapSelectionLayer) throws IOException;
Copy link
Collaborator

@halset halset Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should continue to be a List<Area> as some organizations might prefer to handle a list of areas in a single job?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants