IntegrityError: hazard location too close together?

23 views
Skip to first unread message

christian....@gmail.com

unread,
May 22, 2015, 4:30:03 AM5/22/15
to openqua...@googlegroups.com
Hi

I am running a hazard job using a given exposure model as input for the locations.

I get this error:

IntegrityError: duplicate key value violates unique constraint "hzrdi_hazard_site_location_hazard_calculation_uniq_idx" DETAIL: Key (location, hazard_calculation_id)=(0101000020E6100000049C2C556CFB1A40B90BFFAF5B7D4740, 71) already exists. CONTEXT: COPY hazard_site, line 331: "189667 71 SRID=4326;POINT (6.7455304439999999 46.9793605799999980)"

earlier in the exposure file I have a location at (6.74553 46.97936). this is very close but not equal.
I ran it on another machine and it worked.

Is there a setting I have to change? in order OpenQuake reads all digits or something similar?

thanks
Chriss

Michele Simionato

unread,
May 22, 2015, 5:20:19 AM5/22/15
to openqua...@googlegroups.com
There is no such a thing as a precision setting for locations in OpenQuake, even if perhaps there is in PostGIS. What happens if you change slightly the location of your asset, for instance if you change

(6.74553 46.97936) -> (6.74553 46.97935) ?

Is this a reasonable workaround?

christian....@gmail.com

unread,
May 25, 2015, 5:47:42 AM5/25/15
to openqua...@googlegroups.com
I created now an exposure only with the two locations:
6.74553 46.97936 and the one closeby. 6.7455305 46.97936 gives the error, 6.7455306 46.97936 does not give the error.
Reply all
Reply to author
Forward
0 new messages