Skip to content

Commit

Permalink
fix lambert conformal conic
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jan 10, 2024
1 parent 9417cd6 commit dfe8ece
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/frontend/src/components/SubmitButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ async function submitBbox(bbox, model) {
// https://epsg.io/3082
// const transform = transformation('EPSG:4326', '3082') // WGS 84 to LCC
// var secondProjection = '+proj=lcc +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs';
let firstProjection = proj4('EPSG:3857')
let secondProjection = '+proj=lcc +lat_1=30 +lat_2=60 +lat_0=40.0000076293945 +lon_0=-97 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs'
const lccLowerLeft = proj4(secondProjection, lowerLeft)
const lccLowerLeft = proj4(firstProjection, secondProjection, lowerLeft)
// const lccUpperLeft = proj4(secondProjection, upperLeft)
const lccUpperRight = proj4(secondProjection, upperRight)
const lccUpperRight = proj4(firstProjection, secondProjection, upperRight)
// const lccLowerRight = proj4(secondProjection, lowerRight)
ymin = lccLowerLeft[1]
xmin = lccLowerLeft[0]
xmax = lccUpperRight[0]
ymax = lccUpperRight[1]
const params = `y_south=${ymin}&y_north=${ymax}&x_west=${xmin}&x_east=${xmax}`
const params = `y_south=${ymin}&y_north=${ymax}&x_west=${xmax}&x_east=${xmin}`
fetchWrapper.post(`${ENDPOINTS.submit}/${model}?${params}`)
}
Expand Down

0 comments on commit dfe8ece

Please sign in to comment.