Changes

Space coordinates

6,908 bytes added, 16:04, 23 June 2014
no edit summary
{{note| This query is in 5.x format}}This query finds invalid / space coordinates. The invalid coordinates need to be corrected.
<pre>
SELECT
geopoint.userenteredcoord IS NULL
</pre>
 {{noteNote | This If you get a result set from the query is in 5above the following queries will help you to identify to which object they belong.x format}} '''Location''' <pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,locationinfoversion.location_localidFROMfieldreportInner Join geopointInner Join locationinfoversion ON locationinfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join locationinfoversion_has_geospatialinfo ON locationinfoversion_has_geospatialinfo.locationinfoversion_guid = locationinfoversion.locationinfoversion_guid AND locationinfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre> '''Hazard'''<pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,hazardinfoversion.hazard_localidFROMfieldreportInner Join geopointInner Join hazardinfoversion ON hazardinfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join hazardinfoversion_has_geospatialinfo ON hazardinfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guid AND hazardinfoversion_has_geospatialinfo.hazardinfoversion_guid = hazardinfoversion.hazardinfoversion_guidWHEREgeopoint.longitude > '80' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre> '''Hazard Reduction'''<pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,hazreducinfoversion.hazreduc_localidFROMfieldreportInner Join geopointInner Join hazreducinfoversion ON hazreducinfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join hazreducinfoversion_has_geospatialinfo ON hazreducinfoversion_has_geospatialinfo.hazreducinfoversion_guid = hazreducinfoversion.hazreducinfoversion_guid AND hazreducinfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre> '''Accident'''<pre>SELECTaccidentinfoversion.accident_localid,fieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitudeFROMaccidentinfoversionInner Join accidentinfoversion_has_geospatialinfo ON accidentinfoversion.accidentinfoversion_guid = accidentinfoversion_has_geospatialinfo.accidentinfoversion_guidInner Join fieldreport ON accidentinfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join geopoint ON accidentinfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre> '''Victim'''<pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,victiminfoversion.victim_localidFROMfieldreportInner Join geopointInner Join victiminfoversion ON victiminfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join victiminfoversion_has_geospatialinfo ON victiminfoversion_has_geospatialinfo.victiminfoversion_guid = victiminfoversion.victiminfoversion_guid AND victiminfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre><pre> '''MRE'''</pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,mreinfoversion.mre_localidFROMfieldreportInner Join geopointInner Join mreinfoversion ON mreinfoversion.fieldreport_guid = fieldreport.fieldreport_guidInner Join mreinfoversion_has_geospatialinfo ON mreinfoversion.mreinfoversion_guid = mreinfoversion_has_geospatialinfo.mreinfoversion_guid AND mreinfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90' '''QM'''<pre>SELECTfieldreport.fieldreport_localid,geopoint.longitude,geopoint.latitude,qainfoversion.qa_localidFROMfieldreportInner Join geopointInner Join qainfoversion ON fieldreport.fieldreport_guid = qainfoversion.fieldreport_guidInner Join qainfoversion_has_geospatialinfo ON qainfoversion.qainfoversion_guid = qainfoversion_has_geospatialinfo.qainfoversion_guid AND qainfoversion_has_geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidWHEREgeopoint.longitude > '180' ORgeopoint.latitude > '90' ORgeopoint.longitude < '-180' ORgeopoint.latitude < '-90'</pre> '''Country Structure'''<pre>SELECTgazetteer.gazetteername,geopoint.pointno,geopoint.longitude,geopoint.latitudeFROMgeopointInner Join geospatialinfo ON geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidInner Join gazetteer_has_geospatialinfo ON geospatialinfo.geospatialinfo_guid = gazetteer_has_geospatialinfo.geospatialinfo_guidInner Join gazetteer ON gazetteer.gazetteer_guid = gazetteer_has_geospatialinfo.gazetteer_guidWHEREgeopoint.longitude > '180' ORgeopoint.longitude < '-180' ORgeopoint.latitude > '90' ORgeopoint.latitude < '-90'</pre> '''Organisation'''<pre>SELECTorganisation.orgname,geopoint.pointno,geopoint.longitude,geopoint.latitudeFROMgeopointInner Join geospatialinfo ON geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidInner Join organisation_has_geospatialinfo ON organisation_has_geospatialinfo.geospatialinfo_guid = geospatialinfo.geospatialinfo_guidInner Join organisation ON organisation.org_guid = organisation_has_geospatialinfo.org_guidWHEREgeopoint.longitude > '180' ORgeopoint.longitude < '-180' ORgeopoint.latitude > '90' ORgeopoint.latitude < '-90'</pre> '''Place'''<pre>SELECTplace.placename,geopoint.pointno,geopoint.longitude,geopoint.latitudeFROMgeopointInner Join geospatialinfo ON geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidInner Join place_has_geospatialinfo ON place_has_geospatialinfo.geospatialinfo_guid = geospatialinfo.geospatialinfo_guidInner Join place ON place.place_guid = place_has_geospatialinfo.place_guidWHEREgeopoint.longitude > '180' ORgeopoint.longitude < '-180' ORgeopoint.latitude > '90' ORgeopoint.latitude < '-90'</pre> '''Task'''<pre>SELECTtask.name,geopoint.pointno,geopoint.longitude,geopoint.latitudeFROMgeopointInner Join geospatialinfo ON geospatialinfo.geospatialinfo_guid = geopoint.geospatialinfo_guidInner Join task_has_geospatialinfo ON geospatialinfo.geospatialinfo_guid = task_has_geospatialinfo.geospatialinfo_guidInner Join task ON task_has_geospatialinfo.task_guid = task.guidWHEREgeopoint.longitude > '180' ORgeopoint.longitude < '-180' ORgeopoint.latitude > '90' ORgeopoint.latitude < '-90'</pre>
{{NavBox Upgrade}}
6,632
edits