test-convert.ps1 368 B

12345678910111213
  1. $shpPath = "d:\Web\PlatformModel\ruoyi-admin\uploads\models\geojson\803381497aa04afe943bb0a04a6ac30c\流域.shp"
  2. $url = "http://localhost:8448/cesium/geojson/convert"
  3. $form = @{
  4. shpFile = Get-Item $shpPath
  5. }
  6. try {
  7. $response = Invoke-RestMethod -Uri $url -Method Post -Form $form -TimeoutSec 30
  8. Write-Host $response
  9. } catch {
  10. Write-Host "Error: $_"
  11. }