- Home
- Skills
- Agents & Orchestration
- Geospatial Engineer (agent)
Geospatial Engineer (agent)
Geospatial Engineer (agent): Builds GIS applications with PostGIS, spatial queries, mapping APIs, tile servers, and geospatial data processing pipelines
$9
Geospatial Engineer (agent)
Example session with this skill installed
Design a Laravel migration and a repository method to find all 'delivery_zones' that contain a specific lat/long point using PostGIS.
- Read your context and instructions
- Compiled the geospatial engineer agent
I have designed the migration using the geography type for accuracy and implemented the repository logic using raw spatial expressions.
Geospatial Implementation: Delivery Zones
Database Migration
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration {
public function up(): void {
Schema::create('delivery_zones', function (Blueprint $table) {
$table->id();
$table->string('name');
// Use geography for accurate measurements on the earth's surface
$table->geography('area', 'polygon', 4326);
$table->timestamps();
});
// Add a GIST index for spatial performance
DB::statement('CREATE INDEX delivery_zones_area_gist ON delivery_zones USING GIST (area)');
}
public function down(): void {
Schema::dropIfExists('delivery_zones');
}
};
Repository Method
namespace App\Repositories;
use App\Models\DeliveryZone;
use Illuminate\Support\Collection;
class DeliveryRepository {
public function findZonesForCoordinates(float $latitude, float $longitude): Collection {
return DeliveryZone::query()
->whereRaw("ST_Contains(area::geometry, ST_SetSRID(ST_Point(?, ?), 4326)::geometry)", [
$longitude,
$latitude
])
->get();
}
}
Assumptions
- The application uses SRID 4326 (WGS 84) as the standard coordinate system.
- The
PostGISextension is already enabled on the PostgreSQL server.
Risks and open questions
- Performance: For extremely high-resolution polygons,
ST_Containscan be slow; considerST_Intersectsif boundaries are simple. - Precision: Ensure incoming float values from the API are not truncated before reaching the query.
Verification
- Migration includes a GIST index to prevent full table scans on spatial lookups.
- Query uses
ST_SetSRIDto ensure the input point matches the column's spatial reference system.
Next steps
- Run
php artisan migrateto create the table and spatial index. - Seed the table with GeoJSON data using
ST_GeomFromGeoJSON. - Add a request validator to ensure latitude/longitude values are within global bounds.
Connects securely to your tools. The creator never sees your data.
About this skill
Building GIS applications requires precision in coordinate systems, spatial indexing, and database optimization. This skill manages the complexity of PostGIS integrations, mapping APIs, and geospatial data processing within Laravel environments.
What it does
- Spatial Query Design writes optimized SQL and Eloquent queries using PostGIS functions for proximity, intersection, and containment.
- GIS Architecture designs database schemas with appropriate geometry/geography types and spatial indexing.
- API Integration configures Mapbox, Google Maps, or OpenStreetMap integrations including tile server logic.
- Data Processing handles GeoJSON, KML, and WKT format conversions and validation.
- Assumption Mapping identifies missing spatial constraints or coordinate system requirements instead of guessing.
How it works
- Goal Restatement summarizes the geospatial objective to ensure spatial logic alignment.
- Gap Analysis lists provided inputs and identifies missing data like SRID or precision requirements.
- Execution Plan outlines the steps for database migration, query logic, or frontend mapping implementation.
- Validation checks the output against geospatial security standards and coding conventions.
Frameworks & tools
Laravel, PHP, PostGIS, PostgreSQL, GeoJSON, WKT, Leaflet/Mapbox, and OGC standards.
Why this beats prompting it yourself
Standard prompts often fail at the nuances of SRID 4326 vs 3857 or neglect spatial index performance. This skill enforces a strict architectural workflow that prioritizes accuracy and verifiable spatial logic over generic code generation.
Use cases
- Implement store locator logic using PostGIS distance functions.
- Build custom tile server controllers for dynamic map layers.
- Create migrations for complex polygon and multipolygon storage.
- Optimize slow spatial joins in large-scale location datasets.
Known limitations
Does not perform live testing of third-party API keys. Requires an existing PostgreSQL/PostGIS environment for query verification.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 days ago
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.