Package org.geo.spatialsearch.census.model

Examples of org.geo.spatialsearch.census.model.Block2010


   
   
    @Test
    public void testBlockById() {
        Long id = 1L;
        Block2010 block = (Block2010) censusService.findById(
                CensusGeographyEnum.BLOCK2010, id);
        assertNotNull(block);
        assertEquals(block.getGeoid(), "360010019012001");
    }
View Full Code Here


        coordinate.y = 42.649;
        List<Block2010> blocks = censusService
                .findByCoordinates(CensusGeographyEnum.BLOCK2010, coordinate.x,
                        coordinate.y).getCensusLookupBaseResponse().getBlocks();
        Assert.assertFalse(blocks.isEmpty());
        Block2010 block = blocks.get(0);
        assertEquals(block.getStatefp(), "36");
        assertEquals(block.getGeoid(), "360010019012001");
    }
View Full Code Here

  @Transactional(readOnly = true)
  private void findBlockByPoint(CensusLookupResponse apiResponse, Point point) {
    final Criteria blockCriteria = block2010DAO.createCriteria();
    blockCriteria.add(SpatialRestrictions.contains("geometry", point));
    Block2010 block = block2010DAO.findByCriteria(blockCriteria);
    if (block != null) {
      block.setEnvelope(new Envelope(block.getGeometry()
          .getEnvelopeInternal()));
      apiResponse.getCensusLookupBaseResponse().getBlocks().add(block);
    }
    ValidationUtil.isEmptyResult(apiResponse, apiResponse
        .getCensusLookupBaseResponse().getBlocks(),
View Full Code Here

TOP

Related Classes of org.geo.spatialsearch.census.model.Block2010

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.