openclimatefix / openclimatefix/data-platform

Feature Request: Support updating location geometry (latitude/longitude) in UpdateLocationRequest

Open
#183 0 comments 0 reactions 1 assignee View on GitHub

@devsjc is already working on this.

Since Jul 9, 2026.

Dominant language
Go
Stars
3
Forks
1
Avg merge
44m
Merged PRs (30d)
2

Description

Verification
  • I have searched the existing issues to ensure this feature has not already been requested.
Provide a detailed description of the proposed feature.

In the quartz-api service, the PUT /sites/{site_uuid} endpoint allows users to update a site's properties, including its latitude and longitude coordinates.

However, the Data Platform (DP) gRPC service currently does not support updating coordinates for an existing location. The UpdateLocationRequest message only exposes fields to update capacity, name, and metadata, but has no geometry/WKT fields:

protobuf
// Current UpdateLocationRequest Schema
message UpdateLocationRequest {
    string location_uuid = 1;
    EnergySource energy_source = 2;
    string new_location_name = 3;
    int64 new_effective_capacity_watts = 4;
    google.protobuf.Struct new_metadata = 5;
    google.protobuf.Timestamp valid_from_utc = 6;
}

Because of this limitation:

quartz-api must ignore any coordinate updates passed during PUT requests for existing sites.
Coordinates are immutable after location creation.
Proposed Solution
Update the Data Platform gRPC API schema to support updating location geometry.

Specifically, we propose adding a new_geometry_wkt string field (or separate new_latitude/new_longitude fields) to UpdateLocationRequest:

protobuf
message UpdateLocationRequest {
    string location_uuid = 1;
    EnergySource energy_source = 2;
    string new_location_name = 3;
    int64 new_effective_capacity_watts = 4;
    google.protobuf.Struct new_metadata = 5;
    google.protobuf.Timestamp valid_from_utc = 6;
    string new_geometry_wkt = 7; // <--- ADD THIS FIELD
}

This will allow the downstream database engines to execute geometry updates (e.g., UPDATE locations SET geometry = ST_GeomFromText(new_geometry_wkt) WHERE ...) and align the API client behavior.

What is the motivation for the feature?

Correcting Seeding Errors: Clients should be able to update the locations lat lon

Outline a potential approach or solution (optional).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.