Angular (Frontend) + .NET API (Backend) + SQL Server (Database)
This application allows users to:
✅ Upload Shapefiles (.shp
+ .prj
) in WGS84 (EPSG:4326)
✅ View uploaded geometries on a map
✅ Zoom to features & edit labels
✅ Draw new polygons/polylines
- .NET 8.0+ SDK
- SQL Server
-
Install required libraries (run in
/backend
folder):dotnet restore
-
Configure
appsettings.json
Update the connection string:"ConnectionStrings": { "DefaultConnection": "Server=YOUR_SERVER;Database=GeoAppDb;Trusted_Connection=True;" }
-
Run EF Core Migrations
dotnet ef migrations add InitialCreate dotnet ef database update
-
Start the API
dotnet run
- API runs at
https://localhost:5001
(orhttp://localhost:7284
)
- API runs at
- Node.js (v20)
- Angular CLI (
npm install -g @angular/cli
)
-
Install dependencies (run in
/frontend
folder):npm install
-
Configure
environment.ts
Update the API URL:export const environment = { production: false, apiUrl: 'https://localhost:7284/api' // Match your .NET API URL };
-
Start the Angular app
ng serve
- App runs at
http://localhost:4200
- App runs at
- Only WGS84 (EPSG:4326) Shapefiles are supported.
- Upload both
.shp
and.prj
files at the same time. - After upload, the Shapefile table updates automatically.
- Click a Shapefile → Shows all geometries on the map.
- Click a row in the Geometries table → Zooms to that feature.
- Click a geometry on the map → Opens a popup to edit its label.
- Draw polygons/polylines using the toolbar.
- Finish a sketch by:
- Right-click
- Double left-click
- After finishing, a popup appears to add a label.
Issue | Solution |
---|---|
Shapefile upload fails | Ensure .shp and .prj are uploaded together. |
API not reachable | Check environment.ts and CORS settings in .NET API . |
Migrations fail | Verify SQL Server connection string in appsettings.json . |
/backend → .NET API (C#)
/frontend → Angular (TypeScript)
/Shapefiles → Sample uploads
- Frontend: Angular 20, CesiumJS
- Backend: .NET 8, EF Core, NetTopologySuite
- Database: SQL Server
🎉 Ready to go! Run both the API (dotnet run
) and Angular app (ng serve
), then start uploading Shapefiles.