Rename address.geom to address.location
It's a better name.
This commit is contained in:
parent
e44bc62325
commit
4494bd97cf
9 changed files with 93 additions and 88 deletions
|
|
@ -149,10 +149,10 @@ func JobCommit(ctx context.Context, file_id int32) error {
|
|||
return fmt.Errorf("insert review task: %w", err)
|
||||
}
|
||||
_, err = models.ReviewTaskPools.Insert(&models.ReviewTaskPoolSetter{
|
||||
FeaturePool: omit.From(feature.ID),
|
||||
Location: omitnull.FromPtr[string](nil),
|
||||
Geometry: omitnull.FromPtr[string](nil),
|
||||
ReviewTaskID: omit.From(review_task.ID),
|
||||
FeaturePoolID: omit.From(feature.ID),
|
||||
Location: omitnull.FromPtr[string](nil),
|
||||
Geometry: omitnull.FromPtr[string](nil),
|
||||
ReviewTaskID: omit.From(review_task.ID),
|
||||
}).One(ctx, txn)
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ func EnsureAddress(ctx context.Context, txn bob.Tx, org *models.Organization, a
|
|||
return &models.Address{
|
||||
Country: geo.Address.Country,
|
||||
Created: created,
|
||||
Geom: "",
|
||||
H3cell: "",
|
||||
ID: row.ID,
|
||||
Locality: geo.Address.Locality,
|
||||
Location: "",
|
||||
PostalCode: geo.Address.PostalCode,
|
||||
Street: geo.Address.Street,
|
||||
Unit: geo.Address.Unit,
|
||||
|
|
@ -173,7 +173,7 @@ func Geocode(ctx context.Context, org *models.Organization, a Address) (GeocodeR
|
|||
// Get the parcel for a given address, if one can be found
|
||||
func GetParcel(ctx context.Context, txn bob.Tx, a *models.Address) (*models.Parcel, error) {
|
||||
result, err := models.Parcels.Query(
|
||||
sm.InnerJoin("address").On(psql.F("ST_Contains", psql.Raw("parcel.geometry"), psql.Raw("address.geom"))),
|
||||
sm.InnerJoin("address").On(psql.F("ST_Contains", psql.Raw("parcel.geometry"), psql.Raw("address.location"))),
|
||||
models.SelectWhere.Addresses.ID.EQ(a.ID),
|
||||
).One(ctx, txn)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue